re-run make idl after Jelmer's "poperly cast array lengths" pidl change.
[Samba.git] / source / librpc / gen_ndr / ndr_winreg.c
blob1a861af29f26aa285d0caa66e442a2f8ae2f92b9
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "librpc/gen_ndr/ndr_winreg.h"
6 #include "librpc/gen_ndr/ndr_lsa.h"
7 #include "librpc/gen_ndr/ndr_initshutdown.h"
8 #include "librpc/gen_ndr/ndr_security.h"
9 static enum ndr_err_code ndr_push_winreg_AccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
11 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
12 return NDR_ERR_SUCCESS;
15 static enum ndr_err_code ndr_pull_winreg_AccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
17 uint32_t v;
18 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
19 *r = v;
20 return NDR_ERR_SUCCESS;
23 _PUBLIC_ void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
25 ndr_print_uint32(ndr, name, r);
26 ndr->depth++;
27 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_QUERY_VALUE", KEY_QUERY_VALUE, r);
28 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_SET_VALUE", KEY_SET_VALUE, r);
29 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_CREATE_SUB_KEY", KEY_CREATE_SUB_KEY, r);
30 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_ENUMERATE_SUB_KEYS", KEY_ENUMERATE_SUB_KEYS, r);
31 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_NOTIFY", KEY_NOTIFY, r);
32 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_CREATE_LINK", KEY_CREATE_LINK, r);
33 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_WOW64_64KEY", KEY_WOW64_64KEY, r);
34 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_WOW64_32KEY", KEY_WOW64_32KEY, r);
35 ndr->depth--;
38 static enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r)
40 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
41 return NDR_ERR_SUCCESS;
44 static enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r)
46 uint32_t v;
47 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
48 *r = v;
49 return NDR_ERR_SUCCESS;
52 _PUBLIC_ void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r)
54 const char *val = NULL;
56 switch (r) {
57 case REG_NONE: val = "REG_NONE"; break;
58 case REG_SZ: val = "REG_SZ"; break;
59 case REG_EXPAND_SZ: val = "REG_EXPAND_SZ"; break;
60 case REG_BINARY: val = "REG_BINARY"; break;
61 case REG_DWORD: val = "REG_DWORD"; break;
62 case REG_DWORD_BIG_ENDIAN: val = "REG_DWORD_BIG_ENDIAN"; break;
63 case REG_LINK: val = "REG_LINK"; break;
64 case REG_MULTI_SZ: val = "REG_MULTI_SZ"; break;
65 case REG_RESOURCE_LIST: val = "REG_RESOURCE_LIST"; break;
66 case REG_FULL_RESOURCE_DESCRIPTOR: val = "REG_FULL_RESOURCE_DESCRIPTOR"; break;
67 case REG_RESOURCE_REQUIREMENTS_LIST: val = "REG_RESOURCE_REQUIREMENTS_LIST"; break;
68 case REG_QWORD: val = "REG_QWORD"; break;
70 ndr_print_enum(ndr, name, "ENUM", val, r);
73 _PUBLIC_ enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, const struct winreg_String *r)
75 if (ndr_flags & NDR_SCALARS) {
76 NDR_CHECK(ndr_push_align(ndr, 4));
77 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
78 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
79 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
81 if (ndr_flags & NDR_BUFFERS) {
82 if (r->name) {
83 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
84 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
85 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
86 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
89 return NDR_ERR_SUCCESS;
92 _PUBLIC_ enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_flags, struct winreg_String *r)
94 uint32_t _ptr_name;
95 TALLOC_CTX *_mem_save_name_0;
96 if (ndr_flags & NDR_SCALARS) {
97 NDR_CHECK(ndr_pull_align(ndr, 4));
98 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_len));
99 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_size));
100 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
101 if (_ptr_name) {
102 NDR_PULL_ALLOC(ndr, r->name);
103 } else {
104 r->name = NULL;
107 if (ndr_flags & NDR_BUFFERS) {
108 if (r->name) {
109 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
110 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
111 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
112 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
113 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
114 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
116 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
117 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
118 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
121 return NDR_ERR_SUCCESS;
124 _PUBLIC_ void ndr_print_winreg_String(struct ndr_print *ndr, const char *name, const struct winreg_String *r)
126 ndr_print_struct(ndr, name, "winreg_String");
127 ndr->depth++;
128 ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->name_len);
129 ndr_print_uint16(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->name_size);
130 ndr_print_ptr(ndr, "name", r->name);
131 ndr->depth++;
132 if (r->name) {
133 ndr_print_string(ndr, "name", r->name);
135 ndr->depth--;
136 ndr->depth--;
139 static enum ndr_err_code ndr_push_KeySecurityData(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityData *r)
141 if (ndr_flags & NDR_SCALARS) {
142 NDR_CHECK(ndr_push_align(ndr, 4));
143 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
144 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
145 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
147 if (ndr_flags & NDR_BUFFERS) {
148 if (r->data) {
149 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
150 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
151 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
152 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->len));
155 return NDR_ERR_SUCCESS;
158 static enum ndr_err_code ndr_pull_KeySecurityData(struct ndr_pull *ndr, int ndr_flags, struct KeySecurityData *r)
160 uint32_t _ptr_data;
161 TALLOC_CTX *_mem_save_data_0;
162 if (ndr_flags & NDR_SCALARS) {
163 NDR_CHECK(ndr_pull_align(ndr, 4));
164 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
165 if (_ptr_data) {
166 NDR_PULL_ALLOC(ndr, r->data);
167 } else {
168 r->data = NULL;
170 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
171 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
173 if (ndr_flags & NDR_BUFFERS) {
174 if (r->data) {
175 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
176 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
177 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
178 NDR_CHECK(ndr_pull_array_length(ndr, &r->data));
179 if (ndr_get_array_length(ndr, &r->data) > ndr_get_array_size(ndr, &r->data)) {
180 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data), ndr_get_array_length(ndr, &r->data));
182 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
183 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_length(ndr, &r->data)));
184 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
186 if (r->data) {
187 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->size));
189 if (r->data) {
190 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->data, r->len));
193 return NDR_ERR_SUCCESS;
196 _PUBLIC_ void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name, const struct KeySecurityData *r)
198 ndr_print_struct(ndr, name, "KeySecurityData");
199 ndr->depth++;
200 ndr_print_ptr(ndr, "data", r->data);
201 ndr->depth++;
202 if (r->data) {
203 ndr_print_array_uint8(ndr, "data", r->data, r->len);
205 ndr->depth--;
206 ndr_print_uint32(ndr, "size", r->size);
207 ndr_print_uint32(ndr, "len", r->len);
208 ndr->depth--;
211 static enum ndr_err_code ndr_push_winreg_SecBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_SecBuf *r)
213 if (ndr_flags & NDR_SCALARS) {
214 NDR_CHECK(ndr_push_align(ndr, 4));
215 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
216 NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS, &r->sd));
217 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->inherit));
219 if (ndr_flags & NDR_BUFFERS) {
220 NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_BUFFERS, &r->sd));
222 return NDR_ERR_SUCCESS;
225 static enum ndr_err_code ndr_pull_winreg_SecBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_SecBuf *r)
227 if (ndr_flags & NDR_SCALARS) {
228 NDR_CHECK(ndr_pull_align(ndr, 4));
229 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
230 NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS, &r->sd));
231 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->inherit));
233 if (ndr_flags & NDR_BUFFERS) {
234 NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_BUFFERS, &r->sd));
236 return NDR_ERR_SUCCESS;
239 _PUBLIC_ void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const struct winreg_SecBuf *r)
241 ndr_print_struct(ndr, name, "winreg_SecBuf");
242 ndr->depth++;
243 ndr_print_uint32(ndr, "length", r->length);
244 ndr_print_KeySecurityData(ndr, "sd", &r->sd);
245 ndr_print_uint8(ndr, "inherit", r->inherit);
246 ndr->depth--;
249 static enum ndr_err_code ndr_push_winreg_CreateAction(struct ndr_push *ndr, int ndr_flags, enum winreg_CreateAction r)
251 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
252 return NDR_ERR_SUCCESS;
255 static enum ndr_err_code ndr_pull_winreg_CreateAction(struct ndr_pull *ndr, int ndr_flags, enum winreg_CreateAction *r)
257 uint32_t v;
258 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
259 *r = v;
260 return NDR_ERR_SUCCESS;
263 _PUBLIC_ void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r)
265 const char *val = NULL;
267 switch (r) {
268 case REG_ACTION_NONE: val = "REG_ACTION_NONE"; break;
269 case REG_CREATED_NEW_KEY: val = "REG_CREATED_NEW_KEY"; break;
270 case REG_OPENED_EXISTING_KEY: val = "REG_OPENED_EXISTING_KEY"; break;
272 ndr_print_enum(ndr, name, "ENUM", val, r);
275 static enum ndr_err_code ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_StringBuf *r)
277 if (ndr_flags & NDR_SCALARS) {
278 NDR_CHECK(ndr_push_align(ndr, 4));
279 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2));
280 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
281 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
283 if (ndr_flags & NDR_BUFFERS) {
284 if (r->name) {
285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2));
286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2 / 2));
288 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term_null(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16));
291 return NDR_ERR_SUCCESS;
294 static enum ndr_err_code ndr_pull_winreg_StringBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_StringBuf *r)
296 uint32_t _ptr_name;
297 TALLOC_CTX *_mem_save_name_0;
298 if (ndr_flags & NDR_SCALARS) {
299 NDR_CHECK(ndr_pull_align(ndr, 4));
300 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
301 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
302 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
303 if (_ptr_name) {
304 NDR_PULL_ALLOC(ndr, r->name);
305 } else {
306 r->name = NULL;
309 if (ndr_flags & NDR_BUFFERS) {
310 if (r->name) {
311 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
312 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
313 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
314 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
315 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
316 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
318 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
319 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
321 if (r->name) {
322 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->name, r->size / 2));
324 if (r->name) {
325 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, r->length / 2));
328 return NDR_ERR_SUCCESS;
331 _PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r)
333 ndr_print_struct(ndr, name, "winreg_StringBuf");
334 ndr->depth++;
335 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term_null(r->name) * 2:r->length);
336 ndr_print_uint16(ndr, "size", r->size);
337 ndr_print_ptr(ndr, "name", r->name);
338 ndr->depth++;
339 if (r->name) {
340 ndr_print_string(ndr, "name", r->name);
342 ndr->depth--;
343 ndr->depth--;
346 static enum ndr_err_code ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_ValNameBuf *r)
348 if (ndr_flags & NDR_SCALARS) {
349 NDR_CHECK(ndr_push_align(ndr, 4));
350 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
351 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
352 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
354 if (ndr_flags & NDR_BUFFERS) {
355 if (r->name) {
356 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2));
357 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
358 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2 / 2));
359 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16));
362 return NDR_ERR_SUCCESS;
365 static enum ndr_err_code ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_ValNameBuf *r)
367 uint32_t _ptr_name;
368 TALLOC_CTX *_mem_save_name_0;
369 if (ndr_flags & NDR_SCALARS) {
370 NDR_CHECK(ndr_pull_align(ndr, 4));
371 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
372 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
373 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
374 if (_ptr_name) {
375 NDR_PULL_ALLOC(ndr, r->name);
376 } else {
377 r->name = NULL;
380 if (ndr_flags & NDR_BUFFERS) {
381 if (r->name) {
382 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
383 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
384 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
385 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
386 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
387 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
389 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
390 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
392 if (r->name) {
393 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->name, r->size / 2));
395 if (r->name) {
396 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, r->length / 2));
399 return NDR_ERR_SUCCESS;
402 _PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r)
404 ndr_print_struct(ndr, name, "winreg_ValNameBuf");
405 ndr->depth++;
406 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->length);
407 ndr_print_uint16(ndr, "size", r->size);
408 ndr_print_ptr(ndr, "name", r->name);
409 ndr->depth++;
410 if (r->name) {
411 ndr_print_string(ndr, "name", r->name);
413 ndr->depth--;
414 ndr->depth--;
417 static enum ndr_err_code ndr_push_KeySecurityAttribute(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityAttribute *r)
419 if (ndr_flags & NDR_SCALARS) {
420 NDR_CHECK(ndr_push_align(ndr, 4));
421 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data_size));
422 NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS, &r->sec_data));
423 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->inherit));
425 if (ndr_flags & NDR_BUFFERS) {
426 NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_BUFFERS, &r->sec_data));
428 return NDR_ERR_SUCCESS;
431 static enum ndr_err_code ndr_pull_KeySecurityAttribute(struct ndr_pull *ndr, int ndr_flags, struct KeySecurityAttribute *r)
433 if (ndr_flags & NDR_SCALARS) {
434 NDR_CHECK(ndr_pull_align(ndr, 4));
435 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_size));
436 NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS, &r->sec_data));
437 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->inherit));
439 if (ndr_flags & NDR_BUFFERS) {
440 NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_BUFFERS, &r->sec_data));
442 return NDR_ERR_SUCCESS;
445 _PUBLIC_ void ndr_print_KeySecurityAttribute(struct ndr_print *ndr, const char *name, const struct KeySecurityAttribute *r)
447 ndr_print_struct(ndr, name, "KeySecurityAttribute");
448 ndr->depth++;
449 ndr_print_uint32(ndr, "data_size", r->data_size);
450 ndr_print_KeySecurityData(ndr, "sec_data", &r->sec_data);
451 ndr_print_uint8(ndr, "inherit", r->inherit);
452 ndr->depth--;
455 static enum ndr_err_code ndr_push_QueryMultipleValue(struct ndr_push *ndr, int ndr_flags, const struct QueryMultipleValue *r)
457 if (ndr_flags & NDR_SCALARS) {
458 NDR_CHECK(ndr_push_align(ndr, 4));
459 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
460 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->type));
461 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->offset));
462 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
464 if (ndr_flags & NDR_BUFFERS) {
465 if (r->name) {
466 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->name));
469 return NDR_ERR_SUCCESS;
472 static enum ndr_err_code ndr_pull_QueryMultipleValue(struct ndr_pull *ndr, int ndr_flags, struct QueryMultipleValue *r)
474 uint32_t _ptr_name;
475 TALLOC_CTX *_mem_save_name_0;
476 if (ndr_flags & NDR_SCALARS) {
477 NDR_CHECK(ndr_pull_align(ndr, 4));
478 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
479 if (_ptr_name) {
480 NDR_PULL_ALLOC(ndr, r->name);
481 } else {
482 r->name = NULL;
484 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->type));
485 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->offset));
486 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
488 if (ndr_flags & NDR_BUFFERS) {
489 if (r->name) {
490 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
491 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
492 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->name));
493 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
496 return NDR_ERR_SUCCESS;
499 _PUBLIC_ void ndr_print_QueryMultipleValue(struct ndr_print *ndr, const char *name, const struct QueryMultipleValue *r)
501 ndr_print_struct(ndr, name, "QueryMultipleValue");
502 ndr->depth++;
503 ndr_print_ptr(ndr, "name", r->name);
504 ndr->depth++;
505 if (r->name) {
506 ndr_print_winreg_String(ndr, "name", r->name);
508 ndr->depth--;
509 ndr_print_winreg_Type(ndr, "type", r->type);
510 ndr_print_uint32(ndr, "offset", r->offset);
511 ndr_print_uint32(ndr, "length", r->length);
512 ndr->depth--;
515 static enum ndr_err_code ndr_push_winreg_OpenHKCR(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCR *r)
517 if (flags & NDR_IN) {
518 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
519 if (r->in.system_name) {
520 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
522 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
524 if (flags & NDR_OUT) {
525 if (r->out.handle == NULL) {
526 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
528 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
529 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
531 return NDR_ERR_SUCCESS;
534 static enum ndr_err_code ndr_pull_winreg_OpenHKCR(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCR *r)
536 uint32_t _ptr_system_name;
537 TALLOC_CTX *_mem_save_system_name_0;
538 TALLOC_CTX *_mem_save_handle_0;
539 if (flags & NDR_IN) {
540 ZERO_STRUCT(r->out);
542 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
543 if (_ptr_system_name) {
544 NDR_PULL_ALLOC(ndr, r->in.system_name);
545 } else {
546 r->in.system_name = NULL;
548 if (r->in.system_name) {
549 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
550 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
551 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
552 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
554 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
555 NDR_PULL_ALLOC(ndr, r->out.handle);
556 ZERO_STRUCTP(r->out.handle);
558 if (flags & NDR_OUT) {
559 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
560 NDR_PULL_ALLOC(ndr, r->out.handle);
562 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
563 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
564 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
565 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
566 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
568 return NDR_ERR_SUCCESS;
571 _PUBLIC_ void ndr_print_winreg_OpenHKCR(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCR *r)
573 ndr_print_struct(ndr, name, "winreg_OpenHKCR");
574 ndr->depth++;
575 if (flags & NDR_SET_VALUES) {
576 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
578 if (flags & NDR_IN) {
579 ndr_print_struct(ndr, "in", "winreg_OpenHKCR");
580 ndr->depth++;
581 ndr_print_ptr(ndr, "system_name", r->in.system_name);
582 ndr->depth++;
583 if (r->in.system_name) {
584 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
586 ndr->depth--;
587 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
588 ndr->depth--;
590 if (flags & NDR_OUT) {
591 ndr_print_struct(ndr, "out", "winreg_OpenHKCR");
592 ndr->depth++;
593 ndr_print_ptr(ndr, "handle", r->out.handle);
594 ndr->depth++;
595 ndr_print_policy_handle(ndr, "handle", r->out.handle);
596 ndr->depth--;
597 ndr_print_WERROR(ndr, "result", r->out.result);
598 ndr->depth--;
600 ndr->depth--;
603 static enum ndr_err_code ndr_push_winreg_OpenHKCU(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCU *r)
605 if (flags & NDR_IN) {
606 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
607 if (r->in.system_name) {
608 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
610 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
612 if (flags & NDR_OUT) {
613 if (r->out.handle == NULL) {
614 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
616 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
617 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
619 return NDR_ERR_SUCCESS;
622 static enum ndr_err_code ndr_pull_winreg_OpenHKCU(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCU *r)
624 uint32_t _ptr_system_name;
625 TALLOC_CTX *_mem_save_system_name_0;
626 TALLOC_CTX *_mem_save_handle_0;
627 if (flags & NDR_IN) {
628 ZERO_STRUCT(r->out);
630 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
631 if (_ptr_system_name) {
632 NDR_PULL_ALLOC(ndr, r->in.system_name);
633 } else {
634 r->in.system_name = NULL;
636 if (r->in.system_name) {
637 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
638 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
639 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
640 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
642 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
643 NDR_PULL_ALLOC(ndr, r->out.handle);
644 ZERO_STRUCTP(r->out.handle);
646 if (flags & NDR_OUT) {
647 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
648 NDR_PULL_ALLOC(ndr, r->out.handle);
650 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
651 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
652 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
653 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
654 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
656 return NDR_ERR_SUCCESS;
659 _PUBLIC_ void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCU *r)
661 ndr_print_struct(ndr, name, "winreg_OpenHKCU");
662 ndr->depth++;
663 if (flags & NDR_SET_VALUES) {
664 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
666 if (flags & NDR_IN) {
667 ndr_print_struct(ndr, "in", "winreg_OpenHKCU");
668 ndr->depth++;
669 ndr_print_ptr(ndr, "system_name", r->in.system_name);
670 ndr->depth++;
671 if (r->in.system_name) {
672 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
674 ndr->depth--;
675 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
676 ndr->depth--;
678 if (flags & NDR_OUT) {
679 ndr_print_struct(ndr, "out", "winreg_OpenHKCU");
680 ndr->depth++;
681 ndr_print_ptr(ndr, "handle", r->out.handle);
682 ndr->depth++;
683 ndr_print_policy_handle(ndr, "handle", r->out.handle);
684 ndr->depth--;
685 ndr_print_WERROR(ndr, "result", r->out.result);
686 ndr->depth--;
688 ndr->depth--;
691 static enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r)
693 if (flags & NDR_IN) {
694 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
695 if (r->in.system_name) {
696 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
698 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
700 if (flags & NDR_OUT) {
701 if (r->out.handle == NULL) {
702 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
704 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
705 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
707 return NDR_ERR_SUCCESS;
710 static enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r)
712 uint32_t _ptr_system_name;
713 TALLOC_CTX *_mem_save_system_name_0;
714 TALLOC_CTX *_mem_save_handle_0;
715 if (flags & NDR_IN) {
716 ZERO_STRUCT(r->out);
718 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
719 if (_ptr_system_name) {
720 NDR_PULL_ALLOC(ndr, r->in.system_name);
721 } else {
722 r->in.system_name = NULL;
724 if (r->in.system_name) {
725 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
726 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
727 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
728 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
730 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
731 NDR_PULL_ALLOC(ndr, r->out.handle);
732 ZERO_STRUCTP(r->out.handle);
734 if (flags & NDR_OUT) {
735 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
736 NDR_PULL_ALLOC(ndr, r->out.handle);
738 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
739 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
740 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
741 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
742 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
744 return NDR_ERR_SUCCESS;
747 _PUBLIC_ void ndr_print_winreg_OpenHKLM(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKLM *r)
749 ndr_print_struct(ndr, name, "winreg_OpenHKLM");
750 ndr->depth++;
751 if (flags & NDR_SET_VALUES) {
752 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
754 if (flags & NDR_IN) {
755 ndr_print_struct(ndr, "in", "winreg_OpenHKLM");
756 ndr->depth++;
757 ndr_print_ptr(ndr, "system_name", r->in.system_name);
758 ndr->depth++;
759 if (r->in.system_name) {
760 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
762 ndr->depth--;
763 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
764 ndr->depth--;
766 if (flags & NDR_OUT) {
767 ndr_print_struct(ndr, "out", "winreg_OpenHKLM");
768 ndr->depth++;
769 ndr_print_ptr(ndr, "handle", r->out.handle);
770 ndr->depth++;
771 ndr_print_policy_handle(ndr, "handle", r->out.handle);
772 ndr->depth--;
773 ndr_print_WERROR(ndr, "result", r->out.result);
774 ndr->depth--;
776 ndr->depth--;
779 static enum ndr_err_code ndr_push_winreg_OpenHKPD(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPD *r)
781 if (flags & NDR_IN) {
782 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
783 if (r->in.system_name) {
784 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
786 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
788 if (flags & NDR_OUT) {
789 if (r->out.handle == NULL) {
790 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
792 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
793 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
795 return NDR_ERR_SUCCESS;
798 static enum ndr_err_code ndr_pull_winreg_OpenHKPD(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPD *r)
800 uint32_t _ptr_system_name;
801 TALLOC_CTX *_mem_save_system_name_0;
802 TALLOC_CTX *_mem_save_handle_0;
803 if (flags & NDR_IN) {
804 ZERO_STRUCT(r->out);
806 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
807 if (_ptr_system_name) {
808 NDR_PULL_ALLOC(ndr, r->in.system_name);
809 } else {
810 r->in.system_name = NULL;
812 if (r->in.system_name) {
813 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
814 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
815 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
816 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
818 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
819 NDR_PULL_ALLOC(ndr, r->out.handle);
820 ZERO_STRUCTP(r->out.handle);
822 if (flags & NDR_OUT) {
823 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
824 NDR_PULL_ALLOC(ndr, r->out.handle);
826 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
827 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
828 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
829 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
830 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
832 return NDR_ERR_SUCCESS;
835 _PUBLIC_ void ndr_print_winreg_OpenHKPD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPD *r)
837 ndr_print_struct(ndr, name, "winreg_OpenHKPD");
838 ndr->depth++;
839 if (flags & NDR_SET_VALUES) {
840 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
842 if (flags & NDR_IN) {
843 ndr_print_struct(ndr, "in", "winreg_OpenHKPD");
844 ndr->depth++;
845 ndr_print_ptr(ndr, "system_name", r->in.system_name);
846 ndr->depth++;
847 if (r->in.system_name) {
848 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
850 ndr->depth--;
851 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
852 ndr->depth--;
854 if (flags & NDR_OUT) {
855 ndr_print_struct(ndr, "out", "winreg_OpenHKPD");
856 ndr->depth++;
857 ndr_print_ptr(ndr, "handle", r->out.handle);
858 ndr->depth++;
859 ndr_print_policy_handle(ndr, "handle", r->out.handle);
860 ndr->depth--;
861 ndr_print_WERROR(ndr, "result", r->out.result);
862 ndr->depth--;
864 ndr->depth--;
867 static enum ndr_err_code ndr_push_winreg_OpenHKU(struct ndr_push *ndr, int flags, const struct winreg_OpenHKU *r)
869 if (flags & NDR_IN) {
870 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
871 if (r->in.system_name) {
872 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
874 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
876 if (flags & NDR_OUT) {
877 if (r->out.handle == NULL) {
878 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
880 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
881 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
883 return NDR_ERR_SUCCESS;
886 static enum ndr_err_code ndr_pull_winreg_OpenHKU(struct ndr_pull *ndr, int flags, struct winreg_OpenHKU *r)
888 uint32_t _ptr_system_name;
889 TALLOC_CTX *_mem_save_system_name_0;
890 TALLOC_CTX *_mem_save_handle_0;
891 if (flags & NDR_IN) {
892 ZERO_STRUCT(r->out);
894 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
895 if (_ptr_system_name) {
896 NDR_PULL_ALLOC(ndr, r->in.system_name);
897 } else {
898 r->in.system_name = NULL;
900 if (r->in.system_name) {
901 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
902 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
903 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
904 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
906 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
907 NDR_PULL_ALLOC(ndr, r->out.handle);
908 ZERO_STRUCTP(r->out.handle);
910 if (flags & NDR_OUT) {
911 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
912 NDR_PULL_ALLOC(ndr, r->out.handle);
914 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
915 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
916 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
917 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
918 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
920 return NDR_ERR_SUCCESS;
923 _PUBLIC_ void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKU *r)
925 ndr_print_struct(ndr, name, "winreg_OpenHKU");
926 ndr->depth++;
927 if (flags & NDR_SET_VALUES) {
928 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
930 if (flags & NDR_IN) {
931 ndr_print_struct(ndr, "in", "winreg_OpenHKU");
932 ndr->depth++;
933 ndr_print_ptr(ndr, "system_name", r->in.system_name);
934 ndr->depth++;
935 if (r->in.system_name) {
936 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
938 ndr->depth--;
939 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
940 ndr->depth--;
942 if (flags & NDR_OUT) {
943 ndr_print_struct(ndr, "out", "winreg_OpenHKU");
944 ndr->depth++;
945 ndr_print_ptr(ndr, "handle", r->out.handle);
946 ndr->depth++;
947 ndr_print_policy_handle(ndr, "handle", r->out.handle);
948 ndr->depth--;
949 ndr_print_WERROR(ndr, "result", r->out.result);
950 ndr->depth--;
952 ndr->depth--;
955 static enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r)
957 if (flags & NDR_IN) {
958 if (r->in.handle == NULL) {
959 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
961 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
963 if (flags & NDR_OUT) {
964 if (r->out.handle == NULL) {
965 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
967 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
968 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
970 return NDR_ERR_SUCCESS;
973 static enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r)
975 TALLOC_CTX *_mem_save_handle_0;
976 if (flags & NDR_IN) {
977 ZERO_STRUCT(r->out);
979 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
980 NDR_PULL_ALLOC(ndr, r->in.handle);
982 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
983 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
984 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
985 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
986 NDR_PULL_ALLOC(ndr, r->out.handle);
987 *r->out.handle = *r->in.handle;
989 if (flags & NDR_OUT) {
990 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
991 NDR_PULL_ALLOC(ndr, r->out.handle);
993 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
994 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
995 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
996 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
997 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
999 return NDR_ERR_SUCCESS;
1002 _PUBLIC_ void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CloseKey *r)
1004 ndr_print_struct(ndr, name, "winreg_CloseKey");
1005 ndr->depth++;
1006 if (flags & NDR_SET_VALUES) {
1007 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1009 if (flags & NDR_IN) {
1010 ndr_print_struct(ndr, "in", "winreg_CloseKey");
1011 ndr->depth++;
1012 ndr_print_ptr(ndr, "handle", r->in.handle);
1013 ndr->depth++;
1014 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1015 ndr->depth--;
1016 ndr->depth--;
1018 if (flags & NDR_OUT) {
1019 ndr_print_struct(ndr, "out", "winreg_CloseKey");
1020 ndr->depth++;
1021 ndr_print_ptr(ndr, "handle", r->out.handle);
1022 ndr->depth++;
1023 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1024 ndr->depth--;
1025 ndr_print_WERROR(ndr, "result", r->out.result);
1026 ndr->depth--;
1028 ndr->depth--;
1031 static enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r)
1033 if (flags & NDR_IN) {
1034 if (r->in.handle == NULL) {
1035 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1037 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1038 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
1039 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyclass));
1040 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.options));
1041 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
1042 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.secdesc));
1043 if (r->in.secdesc) {
1044 NDR_CHECK(ndr_push_winreg_SecBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc));
1046 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.action_taken));
1047 if (r->in.action_taken) {
1048 NDR_CHECK(ndr_push_winreg_CreateAction(ndr, NDR_SCALARS, *r->in.action_taken));
1051 if (flags & NDR_OUT) {
1052 if (r->out.new_handle == NULL) {
1053 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1055 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_handle));
1056 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.action_taken));
1057 if (r->out.action_taken) {
1058 NDR_CHECK(ndr_push_winreg_CreateAction(ndr, NDR_SCALARS, *r->out.action_taken));
1060 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1062 return NDR_ERR_SUCCESS;
1065 static enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r)
1067 uint32_t _ptr_secdesc;
1068 uint32_t _ptr_action_taken;
1069 TALLOC_CTX *_mem_save_handle_0;
1070 TALLOC_CTX *_mem_save_secdesc_0;
1071 TALLOC_CTX *_mem_save_new_handle_0;
1072 TALLOC_CTX *_mem_save_action_taken_0;
1073 if (flags & NDR_IN) {
1074 ZERO_STRUCT(r->out);
1076 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1077 NDR_PULL_ALLOC(ndr, r->in.handle);
1079 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1080 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1081 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1083 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
1084 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyclass));
1085 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.options));
1086 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
1087 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
1088 if (_ptr_secdesc) {
1089 NDR_PULL_ALLOC(ndr, r->in.secdesc);
1090 } else {
1091 r->in.secdesc = NULL;
1093 if (r->in.secdesc) {
1094 _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
1095 NDR_PULL_SET_MEM_CTX(ndr, r->in.secdesc, 0);
1096 NDR_CHECK(ndr_pull_winreg_SecBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc));
1097 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
1099 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_action_taken));
1100 if (_ptr_action_taken) {
1101 NDR_PULL_ALLOC(ndr, r->in.action_taken);
1102 } else {
1103 r->in.action_taken = NULL;
1105 if (r->in.action_taken) {
1106 _mem_save_action_taken_0 = NDR_PULL_GET_MEM_CTX(ndr);
1107 NDR_PULL_SET_MEM_CTX(ndr, r->in.action_taken, 0);
1108 NDR_CHECK(ndr_pull_winreg_CreateAction(ndr, NDR_SCALARS, r->in.action_taken));
1109 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_action_taken_0, 0);
1111 NDR_PULL_ALLOC(ndr, r->out.new_handle);
1112 ZERO_STRUCTP(r->out.new_handle);
1114 if (flags & NDR_OUT) {
1115 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1116 NDR_PULL_ALLOC(ndr, r->out.new_handle);
1118 _mem_save_new_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1119 NDR_PULL_SET_MEM_CTX(ndr, r->out.new_handle, LIBNDR_FLAG_REF_ALLOC);
1120 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_handle));
1121 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_handle_0, LIBNDR_FLAG_REF_ALLOC);
1122 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_action_taken));
1123 if (_ptr_action_taken) {
1124 NDR_PULL_ALLOC(ndr, r->out.action_taken);
1125 } else {
1126 r->out.action_taken = NULL;
1128 if (r->out.action_taken) {
1129 _mem_save_action_taken_0 = NDR_PULL_GET_MEM_CTX(ndr);
1130 NDR_PULL_SET_MEM_CTX(ndr, r->out.action_taken, 0);
1131 NDR_CHECK(ndr_pull_winreg_CreateAction(ndr, NDR_SCALARS, r->out.action_taken));
1132 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_action_taken_0, 0);
1134 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1136 return NDR_ERR_SUCCESS;
1139 _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CreateKey *r)
1141 ndr_print_struct(ndr, name, "winreg_CreateKey");
1142 ndr->depth++;
1143 if (flags & NDR_SET_VALUES) {
1144 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1146 if (flags & NDR_IN) {
1147 ndr_print_struct(ndr, "in", "winreg_CreateKey");
1148 ndr->depth++;
1149 ndr_print_ptr(ndr, "handle", r->in.handle);
1150 ndr->depth++;
1151 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1152 ndr->depth--;
1153 ndr_print_winreg_String(ndr, "name", &r->in.name);
1154 ndr_print_winreg_String(ndr, "keyclass", &r->in.keyclass);
1155 ndr_print_uint32(ndr, "options", r->in.options);
1156 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
1157 ndr_print_ptr(ndr, "secdesc", r->in.secdesc);
1158 ndr->depth++;
1159 if (r->in.secdesc) {
1160 ndr_print_winreg_SecBuf(ndr, "secdesc", r->in.secdesc);
1162 ndr->depth--;
1163 ndr_print_ptr(ndr, "action_taken", r->in.action_taken);
1164 ndr->depth++;
1165 if (r->in.action_taken) {
1166 ndr_print_winreg_CreateAction(ndr, "action_taken", *r->in.action_taken);
1168 ndr->depth--;
1169 ndr->depth--;
1171 if (flags & NDR_OUT) {
1172 ndr_print_struct(ndr, "out", "winreg_CreateKey");
1173 ndr->depth++;
1174 ndr_print_ptr(ndr, "new_handle", r->out.new_handle);
1175 ndr->depth++;
1176 ndr_print_policy_handle(ndr, "new_handle", r->out.new_handle);
1177 ndr->depth--;
1178 ndr_print_ptr(ndr, "action_taken", r->out.action_taken);
1179 ndr->depth++;
1180 if (r->out.action_taken) {
1181 ndr_print_winreg_CreateAction(ndr, "action_taken", *r->out.action_taken);
1183 ndr->depth--;
1184 ndr_print_WERROR(ndr, "result", r->out.result);
1185 ndr->depth--;
1187 ndr->depth--;
1190 static enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r)
1192 if (flags & NDR_IN) {
1193 if (r->in.handle == NULL) {
1194 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1196 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1197 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.key));
1199 if (flags & NDR_OUT) {
1200 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1202 return NDR_ERR_SUCCESS;
1205 static enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r)
1207 TALLOC_CTX *_mem_save_handle_0;
1208 if (flags & NDR_IN) {
1209 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1210 NDR_PULL_ALLOC(ndr, r->in.handle);
1212 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1213 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1214 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1215 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1216 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.key));
1218 if (flags & NDR_OUT) {
1219 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1221 return NDR_ERR_SUCCESS;
1224 _PUBLIC_ void ndr_print_winreg_DeleteKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteKey *r)
1226 ndr_print_struct(ndr, name, "winreg_DeleteKey");
1227 ndr->depth++;
1228 if (flags & NDR_SET_VALUES) {
1229 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1231 if (flags & NDR_IN) {
1232 ndr_print_struct(ndr, "in", "winreg_DeleteKey");
1233 ndr->depth++;
1234 ndr_print_ptr(ndr, "handle", r->in.handle);
1235 ndr->depth++;
1236 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1237 ndr->depth--;
1238 ndr_print_winreg_String(ndr, "key", &r->in.key);
1239 ndr->depth--;
1241 if (flags & NDR_OUT) {
1242 ndr_print_struct(ndr, "out", "winreg_DeleteKey");
1243 ndr->depth++;
1244 ndr_print_WERROR(ndr, "result", r->out.result);
1245 ndr->depth--;
1247 ndr->depth--;
1250 static enum ndr_err_code ndr_push_winreg_DeleteValue(struct ndr_push *ndr, int flags, const struct winreg_DeleteValue *r)
1252 if (flags & NDR_IN) {
1253 if (r->in.handle == NULL) {
1254 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1256 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1257 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.value));
1259 if (flags & NDR_OUT) {
1260 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1262 return NDR_ERR_SUCCESS;
1265 static enum ndr_err_code ndr_pull_winreg_DeleteValue(struct ndr_pull *ndr, int flags, struct winreg_DeleteValue *r)
1267 TALLOC_CTX *_mem_save_handle_0;
1268 if (flags & NDR_IN) {
1269 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1270 NDR_PULL_ALLOC(ndr, r->in.handle);
1272 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1273 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1274 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1275 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1276 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.value));
1278 if (flags & NDR_OUT) {
1279 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1281 return NDR_ERR_SUCCESS;
1284 _PUBLIC_ void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteValue *r)
1286 ndr_print_struct(ndr, name, "winreg_DeleteValue");
1287 ndr->depth++;
1288 if (flags & NDR_SET_VALUES) {
1289 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1291 if (flags & NDR_IN) {
1292 ndr_print_struct(ndr, "in", "winreg_DeleteValue");
1293 ndr->depth++;
1294 ndr_print_ptr(ndr, "handle", r->in.handle);
1295 ndr->depth++;
1296 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1297 ndr->depth--;
1298 ndr_print_winreg_String(ndr, "value", &r->in.value);
1299 ndr->depth--;
1301 if (flags & NDR_OUT) {
1302 ndr_print_struct(ndr, "out", "winreg_DeleteValue");
1303 ndr->depth++;
1304 ndr_print_WERROR(ndr, "result", r->out.result);
1305 ndr->depth--;
1307 ndr->depth--;
1310 static enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r)
1312 if (flags & NDR_IN) {
1313 if (r->in.handle == NULL) {
1314 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1316 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1317 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.enum_index));
1318 if (r->in.name == NULL) {
1319 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1321 NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
1322 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.keyclass));
1323 if (r->in.keyclass) {
1324 NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.keyclass));
1326 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.last_changed_time));
1327 if (r->in.last_changed_time) {
1328 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, *r->in.last_changed_time));
1331 if (flags & NDR_OUT) {
1332 if (r->out.name == NULL) {
1333 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1335 NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
1336 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.keyclass));
1337 if (r->out.keyclass) {
1338 NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.keyclass));
1340 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.last_changed_time));
1341 if (r->out.last_changed_time) {
1342 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, *r->out.last_changed_time));
1344 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1346 return NDR_ERR_SUCCESS;
1349 static enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r)
1351 uint32_t _ptr_keyclass;
1352 uint32_t _ptr_last_changed_time;
1353 TALLOC_CTX *_mem_save_handle_0;
1354 TALLOC_CTX *_mem_save_name_0;
1355 TALLOC_CTX *_mem_save_keyclass_0;
1356 TALLOC_CTX *_mem_save_last_changed_time_0;
1357 if (flags & NDR_IN) {
1358 ZERO_STRUCT(r->out);
1360 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1361 NDR_PULL_ALLOC(ndr, r->in.handle);
1363 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1364 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1365 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1366 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1367 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.enum_index));
1368 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1369 NDR_PULL_ALLOC(ndr, r->in.name);
1371 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1372 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
1373 NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
1374 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
1375 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyclass));
1376 if (_ptr_keyclass) {
1377 NDR_PULL_ALLOC(ndr, r->in.keyclass);
1378 } else {
1379 r->in.keyclass = NULL;
1381 if (r->in.keyclass) {
1382 _mem_save_keyclass_0 = NDR_PULL_GET_MEM_CTX(ndr);
1383 NDR_PULL_SET_MEM_CTX(ndr, r->in.keyclass, 0);
1384 NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.keyclass));
1385 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyclass_0, 0);
1387 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_last_changed_time));
1388 if (_ptr_last_changed_time) {
1389 NDR_PULL_ALLOC(ndr, r->in.last_changed_time);
1390 } else {
1391 r->in.last_changed_time = NULL;
1393 if (r->in.last_changed_time) {
1394 _mem_save_last_changed_time_0 = NDR_PULL_GET_MEM_CTX(ndr);
1395 NDR_PULL_SET_MEM_CTX(ndr, r->in.last_changed_time, 0);
1396 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, r->in.last_changed_time));
1397 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_0, 0);
1399 NDR_PULL_ALLOC(ndr, r->out.name);
1400 *r->out.name = *r->in.name;
1402 if (flags & NDR_OUT) {
1403 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1404 NDR_PULL_ALLOC(ndr, r->out.name);
1406 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1407 NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
1408 NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
1409 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
1410 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyclass));
1411 if (_ptr_keyclass) {
1412 NDR_PULL_ALLOC(ndr, r->out.keyclass);
1413 } else {
1414 r->out.keyclass = NULL;
1416 if (r->out.keyclass) {
1417 _mem_save_keyclass_0 = NDR_PULL_GET_MEM_CTX(ndr);
1418 NDR_PULL_SET_MEM_CTX(ndr, r->out.keyclass, 0);
1419 NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.keyclass));
1420 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyclass_0, 0);
1422 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_last_changed_time));
1423 if (_ptr_last_changed_time) {
1424 NDR_PULL_ALLOC(ndr, r->out.last_changed_time);
1425 } else {
1426 r->out.last_changed_time = NULL;
1428 if (r->out.last_changed_time) {
1429 _mem_save_last_changed_time_0 = NDR_PULL_GET_MEM_CTX(ndr);
1430 NDR_PULL_SET_MEM_CTX(ndr, r->out.last_changed_time, 0);
1431 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, r->out.last_changed_time));
1432 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_0, 0);
1434 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1436 return NDR_ERR_SUCCESS;
1439 _PUBLIC_ void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumKey *r)
1441 ndr_print_struct(ndr, name, "winreg_EnumKey");
1442 ndr->depth++;
1443 if (flags & NDR_SET_VALUES) {
1444 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1446 if (flags & NDR_IN) {
1447 ndr_print_struct(ndr, "in", "winreg_EnumKey");
1448 ndr->depth++;
1449 ndr_print_ptr(ndr, "handle", r->in.handle);
1450 ndr->depth++;
1451 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1452 ndr->depth--;
1453 ndr_print_uint32(ndr, "enum_index", r->in.enum_index);
1454 ndr_print_ptr(ndr, "name", r->in.name);
1455 ndr->depth++;
1456 ndr_print_winreg_StringBuf(ndr, "name", r->in.name);
1457 ndr->depth--;
1458 ndr_print_ptr(ndr, "keyclass", r->in.keyclass);
1459 ndr->depth++;
1460 if (r->in.keyclass) {
1461 ndr_print_winreg_StringBuf(ndr, "keyclass", r->in.keyclass);
1463 ndr->depth--;
1464 ndr_print_ptr(ndr, "last_changed_time", r->in.last_changed_time);
1465 ndr->depth++;
1466 if (r->in.last_changed_time) {
1467 ndr_print_NTTIME(ndr, "last_changed_time", *r->in.last_changed_time);
1469 ndr->depth--;
1470 ndr->depth--;
1472 if (flags & NDR_OUT) {
1473 ndr_print_struct(ndr, "out", "winreg_EnumKey");
1474 ndr->depth++;
1475 ndr_print_ptr(ndr, "name", r->out.name);
1476 ndr->depth++;
1477 ndr_print_winreg_StringBuf(ndr, "name", r->out.name);
1478 ndr->depth--;
1479 ndr_print_ptr(ndr, "keyclass", r->out.keyclass);
1480 ndr->depth++;
1481 if (r->out.keyclass) {
1482 ndr_print_winreg_StringBuf(ndr, "keyclass", r->out.keyclass);
1484 ndr->depth--;
1485 ndr_print_ptr(ndr, "last_changed_time", r->out.last_changed_time);
1486 ndr->depth++;
1487 if (r->out.last_changed_time) {
1488 ndr_print_NTTIME(ndr, "last_changed_time", *r->out.last_changed_time);
1490 ndr->depth--;
1491 ndr_print_WERROR(ndr, "result", r->out.result);
1492 ndr->depth--;
1494 ndr->depth--;
1497 static enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct winreg_EnumValue *r)
1499 if (flags & NDR_IN) {
1500 if (r->in.handle == NULL) {
1501 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1503 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.enum_index));
1505 if (r->in.name == NULL) {
1506 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1508 NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
1509 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.type));
1510 if (r->in.type) {
1511 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->in.type));
1513 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.value));
1514 if (r->in.value) {
1515 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.size));
1516 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1517 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.length));
1518 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.value, *r->in.length));
1520 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.size));
1521 if (r->in.size) {
1522 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.size));
1524 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.length));
1525 if (r->in.length) {
1526 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.length));
1529 if (flags & NDR_OUT) {
1530 if (r->out.name == NULL) {
1531 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1533 NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
1534 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.type));
1535 if (r->out.type) {
1536 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
1538 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.value));
1539 if (r->out.value) {
1540 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.size));
1541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
1543 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.value, *r->out.length));
1545 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.size));
1546 if (r->out.size) {
1547 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.size));
1549 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.length));
1550 if (r->out.length) {
1551 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
1553 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1555 return NDR_ERR_SUCCESS;
1558 static enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int flags, struct winreg_EnumValue *r)
1560 uint32_t _ptr_type;
1561 uint32_t _ptr_value;
1562 uint32_t _ptr_size;
1563 uint32_t _ptr_length;
1564 TALLOC_CTX *_mem_save_handle_0;
1565 TALLOC_CTX *_mem_save_name_0;
1566 TALLOC_CTX *_mem_save_type_0;
1567 TALLOC_CTX *_mem_save_value_0;
1568 TALLOC_CTX *_mem_save_size_0;
1569 TALLOC_CTX *_mem_save_length_0;
1570 if (flags & NDR_IN) {
1571 ZERO_STRUCT(r->out);
1573 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1574 NDR_PULL_ALLOC(ndr, r->in.handle);
1576 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1577 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1578 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1579 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1580 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.enum_index));
1581 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1582 NDR_PULL_ALLOC(ndr, r->in.name);
1584 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1585 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
1586 NDR_CHECK(ndr_pull_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
1587 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
1588 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
1589 if (_ptr_type) {
1590 NDR_PULL_ALLOC(ndr, r->in.type);
1591 } else {
1592 r->in.type = NULL;
1594 if (r->in.type) {
1595 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
1596 NDR_PULL_SET_MEM_CTX(ndr, r->in.type, 0);
1597 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->in.type));
1598 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, 0);
1600 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1601 if (_ptr_value) {
1602 NDR_PULL_ALLOC(ndr, r->in.value);
1603 } else {
1604 r->in.value = NULL;
1606 if (r->in.value) {
1607 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1608 NDR_PULL_SET_MEM_CTX(ndr, r->in.value, 0);
1609 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value));
1610 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value));
1611 if (ndr_get_array_length(ndr, &r->in.value) > ndr_get_array_size(ndr, &r->in.value)) {
1612 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.value), ndr_get_array_length(ndr, &r->in.value));
1614 NDR_PULL_ALLOC_N(ndr, r->in.value, ndr_get_array_size(ndr, &r->in.value));
1615 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.value, ndr_get_array_length(ndr, &r->in.value)));
1616 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1618 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_size));
1619 if (_ptr_size) {
1620 NDR_PULL_ALLOC(ndr, r->in.size);
1621 } else {
1622 r->in.size = NULL;
1624 if (r->in.size) {
1625 _mem_save_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
1626 NDR_PULL_SET_MEM_CTX(ndr, r->in.size, 0);
1627 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.size));
1628 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_size_0, 0);
1630 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_length));
1631 if (_ptr_length) {
1632 NDR_PULL_ALLOC(ndr, r->in.length);
1633 } else {
1634 r->in.length = NULL;
1636 if (r->in.length) {
1637 _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
1638 NDR_PULL_SET_MEM_CTX(ndr, r->in.length, 0);
1639 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.length));
1640 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, 0);
1642 NDR_PULL_ALLOC(ndr, r->out.name);
1643 *r->out.name = *r->in.name;
1644 if (r->in.value) {
1645 if (r->in.size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
1646 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.value, *r->in.size));
1648 if (r->in.value) {
1649 if (r->in.length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
1650 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.value, *r->in.length));
1653 if (flags & NDR_OUT) {
1654 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1655 NDR_PULL_ALLOC(ndr, r->out.name);
1657 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1658 NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
1659 NDR_CHECK(ndr_pull_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
1660 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
1661 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
1662 if (_ptr_type) {
1663 NDR_PULL_ALLOC(ndr, r->out.type);
1664 } else {
1665 r->out.type = NULL;
1667 if (r->out.type) {
1668 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
1669 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, 0);
1670 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type));
1671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, 0);
1673 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1674 if (_ptr_value) {
1675 NDR_PULL_ALLOC(ndr, r->out.value);
1676 } else {
1677 r->out.value = NULL;
1679 if (r->out.value) {
1680 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1681 NDR_PULL_SET_MEM_CTX(ndr, r->out.value, 0);
1682 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.value));
1683 NDR_CHECK(ndr_pull_array_length(ndr, &r->out.value));
1684 if (ndr_get_array_length(ndr, &r->out.value) > ndr_get_array_size(ndr, &r->out.value)) {
1685 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.value), ndr_get_array_length(ndr, &r->out.value));
1687 NDR_PULL_ALLOC_N(ndr, r->out.value, ndr_get_array_size(ndr, &r->out.value));
1688 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.value, ndr_get_array_length(ndr, &r->out.value)));
1689 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1691 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_size));
1692 if (_ptr_size) {
1693 NDR_PULL_ALLOC(ndr, r->out.size);
1694 } else {
1695 r->out.size = NULL;
1697 if (r->out.size) {
1698 _mem_save_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
1699 NDR_PULL_SET_MEM_CTX(ndr, r->out.size, 0);
1700 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.size));
1701 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_size_0, 0);
1703 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_length));
1704 if (_ptr_length) {
1705 NDR_PULL_ALLOC(ndr, r->out.length);
1706 } else {
1707 r->out.length = NULL;
1709 if (r->out.length) {
1710 _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
1711 NDR_PULL_SET_MEM_CTX(ndr, r->out.length, 0);
1712 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.length));
1713 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, 0);
1715 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1716 if (r->out.value) {
1717 if (r->out.size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
1718 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.value, *r->out.size));
1720 if (r->out.value) {
1721 if (r->out.length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
1722 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.value, *r->out.length));
1725 return NDR_ERR_SUCCESS;
1728 _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumValue *r)
1730 ndr_print_struct(ndr, name, "winreg_EnumValue");
1731 ndr->depth++;
1732 if (flags & NDR_SET_VALUES) {
1733 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1735 if (flags & NDR_IN) {
1736 ndr_print_struct(ndr, "in", "winreg_EnumValue");
1737 ndr->depth++;
1738 ndr_print_ptr(ndr, "handle", r->in.handle);
1739 ndr->depth++;
1740 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1741 ndr->depth--;
1742 ndr_print_uint32(ndr, "enum_index", r->in.enum_index);
1743 ndr_print_ptr(ndr, "name", r->in.name);
1744 ndr->depth++;
1745 ndr_print_winreg_ValNameBuf(ndr, "name", r->in.name);
1746 ndr->depth--;
1747 ndr_print_ptr(ndr, "type", r->in.type);
1748 ndr->depth++;
1749 if (r->in.type) {
1750 ndr_print_winreg_Type(ndr, "type", *r->in.type);
1752 ndr->depth--;
1753 ndr_print_ptr(ndr, "value", r->in.value);
1754 ndr->depth++;
1755 if (r->in.value) {
1756 if (r->in.length == NULL) return;
1757 ndr_print_array_uint8(ndr, "value", r->in.value, *r->in.length);
1759 ndr->depth--;
1760 ndr_print_ptr(ndr, "size", r->in.size);
1761 ndr->depth++;
1762 if (r->in.size) {
1763 ndr_print_uint32(ndr, "size", *r->in.size);
1765 ndr->depth--;
1766 ndr_print_ptr(ndr, "length", r->in.length);
1767 ndr->depth++;
1768 if (r->in.length) {
1769 ndr_print_uint32(ndr, "length", *r->in.length);
1771 ndr->depth--;
1772 ndr->depth--;
1774 if (flags & NDR_OUT) {
1775 ndr_print_struct(ndr, "out", "winreg_EnumValue");
1776 ndr->depth++;
1777 ndr_print_ptr(ndr, "name", r->out.name);
1778 ndr->depth++;
1779 ndr_print_winreg_ValNameBuf(ndr, "name", r->out.name);
1780 ndr->depth--;
1781 ndr_print_ptr(ndr, "type", r->out.type);
1782 ndr->depth++;
1783 if (r->out.type) {
1784 ndr_print_winreg_Type(ndr, "type", *r->out.type);
1786 ndr->depth--;
1787 ndr_print_ptr(ndr, "value", r->out.value);
1788 ndr->depth++;
1789 if (r->out.value) {
1790 if (r->out.length == NULL) return;
1791 ndr_print_array_uint8(ndr, "value", r->out.value, *r->out.length);
1793 ndr->depth--;
1794 ndr_print_ptr(ndr, "size", r->out.size);
1795 ndr->depth++;
1796 if (r->out.size) {
1797 ndr_print_uint32(ndr, "size", *r->out.size);
1799 ndr->depth--;
1800 ndr_print_ptr(ndr, "length", r->out.length);
1801 ndr->depth++;
1802 if (r->out.length) {
1803 ndr_print_uint32(ndr, "length", *r->out.length);
1805 ndr->depth--;
1806 ndr_print_WERROR(ndr, "result", r->out.result);
1807 ndr->depth--;
1809 ndr->depth--;
1812 static enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r)
1814 if (flags & NDR_IN) {
1815 if (r->in.handle == NULL) {
1816 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1818 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1820 if (flags & NDR_OUT) {
1821 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1823 return NDR_ERR_SUCCESS;
1826 static enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r)
1828 TALLOC_CTX *_mem_save_handle_0;
1829 if (flags & NDR_IN) {
1830 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1831 NDR_PULL_ALLOC(ndr, r->in.handle);
1833 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1834 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1835 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1836 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1838 if (flags & NDR_OUT) {
1839 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1841 return NDR_ERR_SUCCESS;
1844 _PUBLIC_ void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_FlushKey *r)
1846 ndr_print_struct(ndr, name, "winreg_FlushKey");
1847 ndr->depth++;
1848 if (flags & NDR_SET_VALUES) {
1849 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1851 if (flags & NDR_IN) {
1852 ndr_print_struct(ndr, "in", "winreg_FlushKey");
1853 ndr->depth++;
1854 ndr_print_ptr(ndr, "handle", r->in.handle);
1855 ndr->depth++;
1856 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1857 ndr->depth--;
1858 ndr->depth--;
1860 if (flags & NDR_OUT) {
1861 ndr_print_struct(ndr, "out", "winreg_FlushKey");
1862 ndr->depth++;
1863 ndr_print_WERROR(ndr, "result", r->out.result);
1864 ndr->depth--;
1866 ndr->depth--;
1869 static enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r)
1871 if (flags & NDR_IN) {
1872 if (r->in.handle == NULL) {
1873 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1875 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1876 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
1877 if (r->in.sd == NULL) {
1878 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1880 NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
1882 if (flags & NDR_OUT) {
1883 if (r->out.sd == NULL) {
1884 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1886 NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd));
1887 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1889 return NDR_ERR_SUCCESS;
1892 static enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r)
1894 TALLOC_CTX *_mem_save_handle_0;
1895 TALLOC_CTX *_mem_save_sd_0;
1896 if (flags & NDR_IN) {
1897 ZERO_STRUCT(r->out);
1899 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1900 NDR_PULL_ALLOC(ndr, r->in.handle);
1902 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1903 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1904 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1905 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1906 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
1907 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1908 NDR_PULL_ALLOC(ndr, r->in.sd);
1910 _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
1911 NDR_PULL_SET_MEM_CTX(ndr, r->in.sd, LIBNDR_FLAG_REF_ALLOC);
1912 NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
1913 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, LIBNDR_FLAG_REF_ALLOC);
1914 NDR_PULL_ALLOC(ndr, r->out.sd);
1915 *r->out.sd = *r->in.sd;
1917 if (flags & NDR_OUT) {
1918 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1919 NDR_PULL_ALLOC(ndr, r->out.sd);
1921 _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
1922 NDR_PULL_SET_MEM_CTX(ndr, r->out.sd, LIBNDR_FLAG_REF_ALLOC);
1923 NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd));
1924 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, LIBNDR_FLAG_REF_ALLOC);
1925 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1927 return NDR_ERR_SUCCESS;
1930 _PUBLIC_ void ndr_print_winreg_GetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetKeySecurity *r)
1932 ndr_print_struct(ndr, name, "winreg_GetKeySecurity");
1933 ndr->depth++;
1934 if (flags & NDR_SET_VALUES) {
1935 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1937 if (flags & NDR_IN) {
1938 ndr_print_struct(ndr, "in", "winreg_GetKeySecurity");
1939 ndr->depth++;
1940 ndr_print_ptr(ndr, "handle", r->in.handle);
1941 ndr->depth++;
1942 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1943 ndr->depth--;
1944 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
1945 ndr_print_ptr(ndr, "sd", r->in.sd);
1946 ndr->depth++;
1947 ndr_print_KeySecurityData(ndr, "sd", r->in.sd);
1948 ndr->depth--;
1949 ndr->depth--;
1951 if (flags & NDR_OUT) {
1952 ndr_print_struct(ndr, "out", "winreg_GetKeySecurity");
1953 ndr->depth++;
1954 ndr_print_ptr(ndr, "sd", r->out.sd);
1955 ndr->depth++;
1956 ndr_print_KeySecurityData(ndr, "sd", r->out.sd);
1957 ndr->depth--;
1958 ndr_print_WERROR(ndr, "result", r->out.result);
1959 ndr->depth--;
1961 ndr->depth--;
1964 static enum ndr_err_code ndr_push_winreg_LoadKey(struct ndr_push *ndr, int flags, const struct winreg_LoadKey *r)
1966 if (flags & NDR_IN) {
1967 if (r->in.handle == NULL) {
1968 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1970 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
1971 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.keyname));
1972 if (r->in.keyname) {
1973 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.keyname));
1975 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.filename));
1976 if (r->in.filename) {
1977 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
1980 if (flags & NDR_OUT) {
1981 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1983 return NDR_ERR_SUCCESS;
1986 static enum ndr_err_code ndr_pull_winreg_LoadKey(struct ndr_pull *ndr, int flags, struct winreg_LoadKey *r)
1988 uint32_t _ptr_keyname;
1989 uint32_t _ptr_filename;
1990 TALLOC_CTX *_mem_save_handle_0;
1991 TALLOC_CTX *_mem_save_keyname_0;
1992 TALLOC_CTX *_mem_save_filename_0;
1993 if (flags & NDR_IN) {
1994 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1995 NDR_PULL_ALLOC(ndr, r->in.handle);
1997 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1998 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1999 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2000 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2001 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyname));
2002 if (_ptr_keyname) {
2003 NDR_PULL_ALLOC(ndr, r->in.keyname);
2004 } else {
2005 r->in.keyname = NULL;
2007 if (r->in.keyname) {
2008 _mem_save_keyname_0 = NDR_PULL_GET_MEM_CTX(ndr);
2009 NDR_PULL_SET_MEM_CTX(ndr, r->in.keyname, 0);
2010 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.keyname));
2011 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyname_0, 0);
2013 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_filename));
2014 if (_ptr_filename) {
2015 NDR_PULL_ALLOC(ndr, r->in.filename);
2016 } else {
2017 r->in.filename = NULL;
2019 if (r->in.filename) {
2020 _mem_save_filename_0 = NDR_PULL_GET_MEM_CTX(ndr);
2021 NDR_PULL_SET_MEM_CTX(ndr, r->in.filename, 0);
2022 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
2023 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filename_0, 0);
2026 if (flags & NDR_OUT) {
2027 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2029 return NDR_ERR_SUCCESS;
2032 _PUBLIC_ void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_LoadKey *r)
2034 ndr_print_struct(ndr, name, "winreg_LoadKey");
2035 ndr->depth++;
2036 if (flags & NDR_SET_VALUES) {
2037 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2039 if (flags & NDR_IN) {
2040 ndr_print_struct(ndr, "in", "winreg_LoadKey");
2041 ndr->depth++;
2042 ndr_print_ptr(ndr, "handle", r->in.handle);
2043 ndr->depth++;
2044 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2045 ndr->depth--;
2046 ndr_print_ptr(ndr, "keyname", r->in.keyname);
2047 ndr->depth++;
2048 if (r->in.keyname) {
2049 ndr_print_winreg_String(ndr, "keyname", r->in.keyname);
2051 ndr->depth--;
2052 ndr_print_ptr(ndr, "filename", r->in.filename);
2053 ndr->depth++;
2054 if (r->in.filename) {
2055 ndr_print_winreg_String(ndr, "filename", r->in.filename);
2057 ndr->depth--;
2058 ndr->depth--;
2060 if (flags & NDR_OUT) {
2061 ndr_print_struct(ndr, "out", "winreg_LoadKey");
2062 ndr->depth++;
2063 ndr_print_WERROR(ndr, "result", r->out.result);
2064 ndr->depth--;
2066 ndr->depth--;
2069 static enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r)
2071 if (flags & NDR_IN) {
2072 if (r->in.handle == NULL) {
2073 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2075 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2076 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.watch_subtree));
2077 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.notify_filter));
2078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
2079 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string1));
2080 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string2));
2081 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
2083 if (flags & NDR_OUT) {
2084 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2086 return NDR_ERR_SUCCESS;
2089 static enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r)
2091 TALLOC_CTX *_mem_save_handle_0;
2092 if (flags & NDR_IN) {
2093 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2094 NDR_PULL_ALLOC(ndr, r->in.handle);
2096 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2097 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2098 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2099 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2100 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.watch_subtree));
2101 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.notify_filter));
2102 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
2103 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string1));
2104 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string2));
2105 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
2107 if (flags & NDR_OUT) {
2108 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2110 return NDR_ERR_SUCCESS;
2113 _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_NotifyChangeKeyValue *r)
2115 ndr_print_struct(ndr, name, "winreg_NotifyChangeKeyValue");
2116 ndr->depth++;
2117 if (flags & NDR_SET_VALUES) {
2118 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2120 if (flags & NDR_IN) {
2121 ndr_print_struct(ndr, "in", "winreg_NotifyChangeKeyValue");
2122 ndr->depth++;
2123 ndr_print_ptr(ndr, "handle", r->in.handle);
2124 ndr->depth++;
2125 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2126 ndr->depth--;
2127 ndr_print_uint8(ndr, "watch_subtree", r->in.watch_subtree);
2128 ndr_print_uint32(ndr, "notify_filter", r->in.notify_filter);
2129 ndr_print_uint32(ndr, "unknown", r->in.unknown);
2130 ndr_print_winreg_String(ndr, "string1", &r->in.string1);
2131 ndr_print_winreg_String(ndr, "string2", &r->in.string2);
2132 ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
2133 ndr->depth--;
2135 if (flags & NDR_OUT) {
2136 ndr_print_struct(ndr, "out", "winreg_NotifyChangeKeyValue");
2137 ndr->depth++;
2138 ndr_print_WERROR(ndr, "result", r->out.result);
2139 ndr->depth--;
2141 ndr->depth--;
2144 static enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r)
2146 if (flags & NDR_IN) {
2147 if (r->in.parent_handle == NULL) {
2148 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2150 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.parent_handle));
2151 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyname));
2152 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
2153 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
2155 if (flags & NDR_OUT) {
2156 if (r->out.handle == NULL) {
2157 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2159 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
2160 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2162 return NDR_ERR_SUCCESS;
2165 static enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r)
2167 TALLOC_CTX *_mem_save_parent_handle_0;
2168 TALLOC_CTX *_mem_save_handle_0;
2169 if (flags & NDR_IN) {
2170 ZERO_STRUCT(r->out);
2172 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2173 NDR_PULL_ALLOC(ndr, r->in.parent_handle);
2175 _mem_save_parent_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2176 NDR_PULL_SET_MEM_CTX(ndr, r->in.parent_handle, LIBNDR_FLAG_REF_ALLOC);
2177 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.parent_handle));
2178 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parent_handle_0, LIBNDR_FLAG_REF_ALLOC);
2179 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyname));
2180 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
2181 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
2182 NDR_PULL_ALLOC(ndr, r->out.handle);
2183 ZERO_STRUCTP(r->out.handle);
2185 if (flags & NDR_OUT) {
2186 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2187 NDR_PULL_ALLOC(ndr, r->out.handle);
2189 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2190 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
2191 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
2192 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2193 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2195 return NDR_ERR_SUCCESS;
2198 _PUBLIC_ void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenKey *r)
2200 ndr_print_struct(ndr, name, "winreg_OpenKey");
2201 ndr->depth++;
2202 if (flags & NDR_SET_VALUES) {
2203 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2205 if (flags & NDR_IN) {
2206 ndr_print_struct(ndr, "in", "winreg_OpenKey");
2207 ndr->depth++;
2208 ndr_print_ptr(ndr, "parent_handle", r->in.parent_handle);
2209 ndr->depth++;
2210 ndr_print_policy_handle(ndr, "parent_handle", r->in.parent_handle);
2211 ndr->depth--;
2212 ndr_print_winreg_String(ndr, "keyname", &r->in.keyname);
2213 ndr_print_uint32(ndr, "unknown", r->in.unknown);
2214 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
2215 ndr->depth--;
2217 if (flags & NDR_OUT) {
2218 ndr_print_struct(ndr, "out", "winreg_OpenKey");
2219 ndr->depth++;
2220 ndr_print_ptr(ndr, "handle", r->out.handle);
2221 ndr->depth++;
2222 ndr_print_policy_handle(ndr, "handle", r->out.handle);
2223 ndr->depth--;
2224 ndr_print_WERROR(ndr, "result", r->out.result);
2225 ndr->depth--;
2227 ndr->depth--;
2230 static enum ndr_err_code ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const struct winreg_QueryInfoKey *r)
2232 if (flags & NDR_IN) {
2233 if (r->in.handle == NULL) {
2234 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2236 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2237 if (r->in.classname == NULL) {
2238 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2240 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.classname));
2242 if (flags & NDR_OUT) {
2243 if (r->out.classname == NULL) {
2244 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2246 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.classname));
2247 if (r->out.num_subkeys == NULL) {
2248 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2250 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_subkeys));
2251 if (r->out.max_subkeylen == NULL) {
2252 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2254 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_subkeylen));
2255 if (r->out.max_classlen == NULL) {
2256 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_classlen));
2259 if (r->out.num_values == NULL) {
2260 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2262 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_values));
2263 if (r->out.max_valnamelen == NULL) {
2264 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2266 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_valnamelen));
2267 if (r->out.max_valbufsize == NULL) {
2268 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_valbufsize));
2271 if (r->out.secdescsize == NULL) {
2272 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.secdescsize));
2275 if (r->out.last_changed_time == NULL) {
2276 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2278 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, *r->out.last_changed_time));
2279 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2281 return NDR_ERR_SUCCESS;
2284 static enum ndr_err_code ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct winreg_QueryInfoKey *r)
2286 TALLOC_CTX *_mem_save_handle_0;
2287 TALLOC_CTX *_mem_save_classname_0;
2288 TALLOC_CTX *_mem_save_num_subkeys_0;
2289 TALLOC_CTX *_mem_save_max_subkeylen_0;
2290 TALLOC_CTX *_mem_save_max_classlen_0;
2291 TALLOC_CTX *_mem_save_num_values_0;
2292 TALLOC_CTX *_mem_save_max_valnamelen_0;
2293 TALLOC_CTX *_mem_save_max_valbufsize_0;
2294 TALLOC_CTX *_mem_save_secdescsize_0;
2295 TALLOC_CTX *_mem_save_last_changed_time_0;
2296 if (flags & NDR_IN) {
2297 ZERO_STRUCT(r->out);
2299 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2300 NDR_PULL_ALLOC(ndr, r->in.handle);
2302 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2303 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2304 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2305 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2306 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2307 NDR_PULL_ALLOC(ndr, r->in.classname);
2309 _mem_save_classname_0 = NDR_PULL_GET_MEM_CTX(ndr);
2310 NDR_PULL_SET_MEM_CTX(ndr, r->in.classname, LIBNDR_FLAG_REF_ALLOC);
2311 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.classname));
2312 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_classname_0, LIBNDR_FLAG_REF_ALLOC);
2313 NDR_PULL_ALLOC(ndr, r->out.classname);
2314 *r->out.classname = *r->in.classname;
2315 NDR_PULL_ALLOC(ndr, r->out.num_subkeys);
2316 ZERO_STRUCTP(r->out.num_subkeys);
2317 NDR_PULL_ALLOC(ndr, r->out.max_subkeylen);
2318 ZERO_STRUCTP(r->out.max_subkeylen);
2319 NDR_PULL_ALLOC(ndr, r->out.max_classlen);
2320 ZERO_STRUCTP(r->out.max_classlen);
2321 NDR_PULL_ALLOC(ndr, r->out.num_values);
2322 ZERO_STRUCTP(r->out.num_values);
2323 NDR_PULL_ALLOC(ndr, r->out.max_valnamelen);
2324 ZERO_STRUCTP(r->out.max_valnamelen);
2325 NDR_PULL_ALLOC(ndr, r->out.max_valbufsize);
2326 ZERO_STRUCTP(r->out.max_valbufsize);
2327 NDR_PULL_ALLOC(ndr, r->out.secdescsize);
2328 ZERO_STRUCTP(r->out.secdescsize);
2329 NDR_PULL_ALLOC(ndr, r->out.last_changed_time);
2330 ZERO_STRUCTP(r->out.last_changed_time);
2332 if (flags & NDR_OUT) {
2333 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2334 NDR_PULL_ALLOC(ndr, r->out.classname);
2336 _mem_save_classname_0 = NDR_PULL_GET_MEM_CTX(ndr);
2337 NDR_PULL_SET_MEM_CTX(ndr, r->out.classname, LIBNDR_FLAG_REF_ALLOC);
2338 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.classname));
2339 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_classname_0, LIBNDR_FLAG_REF_ALLOC);
2340 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2341 NDR_PULL_ALLOC(ndr, r->out.num_subkeys);
2343 _mem_save_num_subkeys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2344 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_subkeys, LIBNDR_FLAG_REF_ALLOC);
2345 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_subkeys));
2346 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_subkeys_0, LIBNDR_FLAG_REF_ALLOC);
2347 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2348 NDR_PULL_ALLOC(ndr, r->out.max_subkeylen);
2350 _mem_save_max_subkeylen_0 = NDR_PULL_GET_MEM_CTX(ndr);
2351 NDR_PULL_SET_MEM_CTX(ndr, r->out.max_subkeylen, LIBNDR_FLAG_REF_ALLOC);
2352 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.max_subkeylen));
2353 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_max_subkeylen_0, LIBNDR_FLAG_REF_ALLOC);
2354 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2355 NDR_PULL_ALLOC(ndr, r->out.max_classlen);
2357 _mem_save_max_classlen_0 = NDR_PULL_GET_MEM_CTX(ndr);
2358 NDR_PULL_SET_MEM_CTX(ndr, r->out.max_classlen, LIBNDR_FLAG_REF_ALLOC);
2359 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.max_classlen));
2360 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_max_classlen_0, LIBNDR_FLAG_REF_ALLOC);
2361 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2362 NDR_PULL_ALLOC(ndr, r->out.num_values);
2364 _mem_save_num_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
2365 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_values, LIBNDR_FLAG_REF_ALLOC);
2366 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_values));
2367 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_values_0, LIBNDR_FLAG_REF_ALLOC);
2368 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2369 NDR_PULL_ALLOC(ndr, r->out.max_valnamelen);
2371 _mem_save_max_valnamelen_0 = NDR_PULL_GET_MEM_CTX(ndr);
2372 NDR_PULL_SET_MEM_CTX(ndr, r->out.max_valnamelen, LIBNDR_FLAG_REF_ALLOC);
2373 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.max_valnamelen));
2374 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_max_valnamelen_0, LIBNDR_FLAG_REF_ALLOC);
2375 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2376 NDR_PULL_ALLOC(ndr, r->out.max_valbufsize);
2378 _mem_save_max_valbufsize_0 = NDR_PULL_GET_MEM_CTX(ndr);
2379 NDR_PULL_SET_MEM_CTX(ndr, r->out.max_valbufsize, LIBNDR_FLAG_REF_ALLOC);
2380 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.max_valbufsize));
2381 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_max_valbufsize_0, LIBNDR_FLAG_REF_ALLOC);
2382 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2383 NDR_PULL_ALLOC(ndr, r->out.secdescsize);
2385 _mem_save_secdescsize_0 = NDR_PULL_GET_MEM_CTX(ndr);
2386 NDR_PULL_SET_MEM_CTX(ndr, r->out.secdescsize, LIBNDR_FLAG_REF_ALLOC);
2387 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.secdescsize));
2388 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdescsize_0, LIBNDR_FLAG_REF_ALLOC);
2389 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2390 NDR_PULL_ALLOC(ndr, r->out.last_changed_time);
2392 _mem_save_last_changed_time_0 = NDR_PULL_GET_MEM_CTX(ndr);
2393 NDR_PULL_SET_MEM_CTX(ndr, r->out.last_changed_time, LIBNDR_FLAG_REF_ALLOC);
2394 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, r->out.last_changed_time));
2395 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_0, LIBNDR_FLAG_REF_ALLOC);
2396 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2398 return NDR_ERR_SUCCESS;
2401 _PUBLIC_ void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryInfoKey *r)
2403 ndr_print_struct(ndr, name, "winreg_QueryInfoKey");
2404 ndr->depth++;
2405 if (flags & NDR_SET_VALUES) {
2406 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2408 if (flags & NDR_IN) {
2409 ndr_print_struct(ndr, "in", "winreg_QueryInfoKey");
2410 ndr->depth++;
2411 ndr_print_ptr(ndr, "handle", r->in.handle);
2412 ndr->depth++;
2413 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2414 ndr->depth--;
2415 ndr_print_ptr(ndr, "classname", r->in.classname);
2416 ndr->depth++;
2417 ndr_print_winreg_String(ndr, "classname", r->in.classname);
2418 ndr->depth--;
2419 ndr->depth--;
2421 if (flags & NDR_OUT) {
2422 ndr_print_struct(ndr, "out", "winreg_QueryInfoKey");
2423 ndr->depth++;
2424 ndr_print_ptr(ndr, "classname", r->out.classname);
2425 ndr->depth++;
2426 ndr_print_winreg_String(ndr, "classname", r->out.classname);
2427 ndr->depth--;
2428 ndr_print_ptr(ndr, "num_subkeys", r->out.num_subkeys);
2429 ndr->depth++;
2430 ndr_print_uint32(ndr, "num_subkeys", *r->out.num_subkeys);
2431 ndr->depth--;
2432 ndr_print_ptr(ndr, "max_subkeylen", r->out.max_subkeylen);
2433 ndr->depth++;
2434 ndr_print_uint32(ndr, "max_subkeylen", *r->out.max_subkeylen);
2435 ndr->depth--;
2436 ndr_print_ptr(ndr, "max_classlen", r->out.max_classlen);
2437 ndr->depth++;
2438 ndr_print_uint32(ndr, "max_classlen", *r->out.max_classlen);
2439 ndr->depth--;
2440 ndr_print_ptr(ndr, "num_values", r->out.num_values);
2441 ndr->depth++;
2442 ndr_print_uint32(ndr, "num_values", *r->out.num_values);
2443 ndr->depth--;
2444 ndr_print_ptr(ndr, "max_valnamelen", r->out.max_valnamelen);
2445 ndr->depth++;
2446 ndr_print_uint32(ndr, "max_valnamelen", *r->out.max_valnamelen);
2447 ndr->depth--;
2448 ndr_print_ptr(ndr, "max_valbufsize", r->out.max_valbufsize);
2449 ndr->depth++;
2450 ndr_print_uint32(ndr, "max_valbufsize", *r->out.max_valbufsize);
2451 ndr->depth--;
2452 ndr_print_ptr(ndr, "secdescsize", r->out.secdescsize);
2453 ndr->depth++;
2454 ndr_print_uint32(ndr, "secdescsize", *r->out.secdescsize);
2455 ndr->depth--;
2456 ndr_print_ptr(ndr, "last_changed_time", r->out.last_changed_time);
2457 ndr->depth++;
2458 ndr_print_NTTIME(ndr, "last_changed_time", *r->out.last_changed_time);
2459 ndr->depth--;
2460 ndr_print_WERROR(ndr, "result", r->out.result);
2461 ndr->depth--;
2463 ndr->depth--;
2466 static enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *r)
2468 if (flags & NDR_IN) {
2469 if (r->in.handle == NULL) {
2470 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2472 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2473 if (r->in.value_name == NULL) {
2474 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2476 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.value_name));
2477 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.type));
2478 if (r->in.type) {
2479 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->in.type));
2481 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
2482 if (r->in.data) {
2483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_size));
2484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.value_length));
2486 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, *r->in.value_length));
2488 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data_size));
2489 if (r->in.data_size) {
2490 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_size));
2492 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.value_length));
2493 if (r->in.value_length) {
2494 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.value_length));
2497 if (flags & NDR_OUT) {
2498 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.type));
2499 if (r->out.type) {
2500 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
2502 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data));
2503 if (r->out.data) {
2504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_size));
2505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.value_length));
2507 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, *r->out.value_length));
2509 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data_size));
2510 if (r->out.data_size) {
2511 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_size));
2513 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.value_length));
2514 if (r->out.value_length) {
2515 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.value_length));
2517 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2519 return NDR_ERR_SUCCESS;
2522 static enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winreg_QueryValue *r)
2524 uint32_t _ptr_type;
2525 uint32_t _ptr_data;
2526 uint32_t _ptr_data_size;
2527 uint32_t _ptr_value_length;
2528 TALLOC_CTX *_mem_save_handle_0;
2529 TALLOC_CTX *_mem_save_value_name_0;
2530 TALLOC_CTX *_mem_save_type_0;
2531 TALLOC_CTX *_mem_save_data_0;
2532 TALLOC_CTX *_mem_save_data_size_0;
2533 TALLOC_CTX *_mem_save_value_length_0;
2534 if (flags & NDR_IN) {
2535 ZERO_STRUCT(r->out);
2537 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2538 NDR_PULL_ALLOC(ndr, r->in.handle);
2540 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2541 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2542 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2543 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2544 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2545 NDR_PULL_ALLOC(ndr, r->in.value_name);
2547 _mem_save_value_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2548 NDR_PULL_SET_MEM_CTX(ndr, r->in.value_name, LIBNDR_FLAG_REF_ALLOC);
2549 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.value_name));
2550 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_name_0, LIBNDR_FLAG_REF_ALLOC);
2551 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
2552 if (_ptr_type) {
2553 NDR_PULL_ALLOC(ndr, r->in.type);
2554 } else {
2555 r->in.type = NULL;
2557 if (r->in.type) {
2558 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
2559 NDR_PULL_SET_MEM_CTX(ndr, r->in.type, 0);
2560 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->in.type));
2561 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, 0);
2563 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2564 if (_ptr_data) {
2565 NDR_PULL_ALLOC(ndr, r->in.data);
2566 } else {
2567 r->in.data = NULL;
2569 if (r->in.data) {
2570 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2571 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
2572 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
2573 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.data));
2574 if (ndr_get_array_length(ndr, &r->in.data) > ndr_get_array_size(ndr, &r->in.data)) {
2575 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.data), ndr_get_array_length(ndr, &r->in.data));
2577 NDR_PULL_ALLOC_N(ndr, r->in.data, ndr_get_array_size(ndr, &r->in.data));
2578 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, ndr_get_array_length(ndr, &r->in.data)));
2579 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2581 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_size));
2582 if (_ptr_data_size) {
2583 NDR_PULL_ALLOC(ndr, r->in.data_size);
2584 } else {
2585 r->in.data_size = NULL;
2587 if (r->in.data_size) {
2588 _mem_save_data_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
2589 NDR_PULL_SET_MEM_CTX(ndr, r->in.data_size, 0);
2590 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.data_size));
2591 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_size_0, 0);
2593 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_length));
2594 if (_ptr_value_length) {
2595 NDR_PULL_ALLOC(ndr, r->in.value_length);
2596 } else {
2597 r->in.value_length = NULL;
2599 if (r->in.value_length) {
2600 _mem_save_value_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
2601 NDR_PULL_SET_MEM_CTX(ndr, r->in.value_length, 0);
2602 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.value_length));
2603 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_length_0, 0);
2605 if (r->in.data) {
2606 if (r->in.data_size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
2607 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, *r->in.data_size));
2609 if (r->in.data) {
2610 if (r->in.value_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
2611 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.data, *r->in.value_length));
2614 if (flags & NDR_OUT) {
2615 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
2616 if (_ptr_type) {
2617 NDR_PULL_ALLOC(ndr, r->out.type);
2618 } else {
2619 r->out.type = NULL;
2621 if (r->out.type) {
2622 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
2623 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, 0);
2624 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type));
2625 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, 0);
2627 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2628 if (_ptr_data) {
2629 NDR_PULL_ALLOC(ndr, r->out.data);
2630 } else {
2631 r->out.data = NULL;
2633 if (r->out.data) {
2634 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2635 NDR_PULL_SET_MEM_CTX(ndr, r->out.data, 0);
2636 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
2637 NDR_CHECK(ndr_pull_array_length(ndr, &r->out.data));
2638 if (ndr_get_array_length(ndr, &r->out.data) > ndr_get_array_size(ndr, &r->out.data)) {
2639 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.data), ndr_get_array_length(ndr, &r->out.data));
2641 NDR_PULL_ALLOC_N(ndr, r->out.data, ndr_get_array_size(ndr, &r->out.data));
2642 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, ndr_get_array_length(ndr, &r->out.data)));
2643 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2645 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_size));
2646 if (_ptr_data_size) {
2647 NDR_PULL_ALLOC(ndr, r->out.data_size);
2648 } else {
2649 r->out.data_size = NULL;
2651 if (r->out.data_size) {
2652 _mem_save_data_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
2653 NDR_PULL_SET_MEM_CTX(ndr, r->out.data_size, 0);
2654 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.data_size));
2655 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_size_0, 0);
2657 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_length));
2658 if (_ptr_value_length) {
2659 NDR_PULL_ALLOC(ndr, r->out.value_length);
2660 } else {
2661 r->out.value_length = NULL;
2663 if (r->out.value_length) {
2664 _mem_save_value_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
2665 NDR_PULL_SET_MEM_CTX(ndr, r->out.value_length, 0);
2666 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.value_length));
2667 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_length_0, 0);
2669 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2670 if (r->out.data) {
2671 if (r->out.data_size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
2672 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, *r->out.data_size));
2674 if (r->out.data) {
2675 if (r->out.value_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
2676 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.data, *r->out.value_length));
2679 return NDR_ERR_SUCCESS;
2682 _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryValue *r)
2684 ndr_print_struct(ndr, name, "winreg_QueryValue");
2685 ndr->depth++;
2686 if (flags & NDR_SET_VALUES) {
2687 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2689 if (flags & NDR_IN) {
2690 ndr_print_struct(ndr, "in", "winreg_QueryValue");
2691 ndr->depth++;
2692 ndr_print_ptr(ndr, "handle", r->in.handle);
2693 ndr->depth++;
2694 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2695 ndr->depth--;
2696 ndr_print_ptr(ndr, "value_name", r->in.value_name);
2697 ndr->depth++;
2698 ndr_print_winreg_String(ndr, "value_name", r->in.value_name);
2699 ndr->depth--;
2700 ndr_print_ptr(ndr, "type", r->in.type);
2701 ndr->depth++;
2702 if (r->in.type) {
2703 ndr_print_winreg_Type(ndr, "type", *r->in.type);
2705 ndr->depth--;
2706 ndr_print_ptr(ndr, "data", r->in.data);
2707 ndr->depth++;
2708 if (r->in.data) {
2709 if (r->in.value_length == NULL) return;
2710 ndr_print_array_uint8(ndr, "data", r->in.data, *r->in.value_length);
2712 ndr->depth--;
2713 ndr_print_ptr(ndr, "data_size", r->in.data_size);
2714 ndr->depth++;
2715 if (r->in.data_size) {
2716 ndr_print_uint32(ndr, "data_size", *r->in.data_size);
2718 ndr->depth--;
2719 ndr_print_ptr(ndr, "value_length", r->in.value_length);
2720 ndr->depth++;
2721 if (r->in.value_length) {
2722 ndr_print_uint32(ndr, "value_length", *r->in.value_length);
2724 ndr->depth--;
2725 ndr->depth--;
2727 if (flags & NDR_OUT) {
2728 ndr_print_struct(ndr, "out", "winreg_QueryValue");
2729 ndr->depth++;
2730 ndr_print_ptr(ndr, "type", r->out.type);
2731 ndr->depth++;
2732 if (r->out.type) {
2733 ndr_print_winreg_Type(ndr, "type", *r->out.type);
2735 ndr->depth--;
2736 ndr_print_ptr(ndr, "data", r->out.data);
2737 ndr->depth++;
2738 if (r->out.data) {
2739 if (r->out.value_length == NULL) return;
2740 ndr_print_array_uint8(ndr, "data", r->out.data, *r->out.value_length);
2742 ndr->depth--;
2743 ndr_print_ptr(ndr, "data_size", r->out.data_size);
2744 ndr->depth++;
2745 if (r->out.data_size) {
2746 ndr_print_uint32(ndr, "data_size", *r->out.data_size);
2748 ndr->depth--;
2749 ndr_print_ptr(ndr, "value_length", r->out.value_length);
2750 ndr->depth++;
2751 if (r->out.value_length) {
2752 ndr_print_uint32(ndr, "value_length", *r->out.value_length);
2754 ndr->depth--;
2755 ndr_print_WERROR(ndr, "result", r->out.result);
2756 ndr->depth--;
2758 ndr->depth--;
2761 static enum ndr_err_code ndr_push_winreg_ReplaceKey(struct ndr_push *ndr, int flags, const struct winreg_ReplaceKey *r)
2763 if (flags & NDR_IN) {
2765 if (flags & NDR_OUT) {
2766 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2768 return NDR_ERR_SUCCESS;
2771 static enum ndr_err_code ndr_pull_winreg_ReplaceKey(struct ndr_pull *ndr, int flags, struct winreg_ReplaceKey *r)
2773 if (flags & NDR_IN) {
2775 if (flags & NDR_OUT) {
2776 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2778 return NDR_ERR_SUCCESS;
2781 _PUBLIC_ void ndr_print_winreg_ReplaceKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_ReplaceKey *r)
2783 ndr_print_struct(ndr, name, "winreg_ReplaceKey");
2784 ndr->depth++;
2785 if (flags & NDR_SET_VALUES) {
2786 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2788 if (flags & NDR_IN) {
2789 ndr_print_struct(ndr, "in", "winreg_ReplaceKey");
2790 ndr->depth++;
2791 ndr->depth--;
2793 if (flags & NDR_OUT) {
2794 ndr_print_struct(ndr, "out", "winreg_ReplaceKey");
2795 ndr->depth++;
2796 ndr_print_WERROR(ndr, "result", r->out.result);
2797 ndr->depth--;
2799 ndr->depth--;
2802 static enum ndr_err_code ndr_push_winreg_RestoreKey(struct ndr_push *ndr, int flags, const struct winreg_RestoreKey *r)
2804 if (flags & NDR_IN) {
2805 if (r->in.handle == NULL) {
2806 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2808 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2809 if (r->in.filename == NULL) {
2810 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2812 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
2813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
2815 if (flags & NDR_OUT) {
2816 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2818 return NDR_ERR_SUCCESS;
2821 static enum ndr_err_code ndr_pull_winreg_RestoreKey(struct ndr_pull *ndr, int flags, struct winreg_RestoreKey *r)
2823 TALLOC_CTX *_mem_save_handle_0;
2824 TALLOC_CTX *_mem_save_filename_0;
2825 if (flags & NDR_IN) {
2826 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2827 NDR_PULL_ALLOC(ndr, r->in.handle);
2829 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2830 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2831 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2832 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2833 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2834 NDR_PULL_ALLOC(ndr, r->in.filename);
2836 _mem_save_filename_0 = NDR_PULL_GET_MEM_CTX(ndr);
2837 NDR_PULL_SET_MEM_CTX(ndr, r->in.filename, LIBNDR_FLAG_REF_ALLOC);
2838 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
2839 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filename_0, LIBNDR_FLAG_REF_ALLOC);
2840 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
2842 if (flags & NDR_OUT) {
2843 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2845 return NDR_ERR_SUCCESS;
2848 _PUBLIC_ void ndr_print_winreg_RestoreKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_RestoreKey *r)
2850 ndr_print_struct(ndr, name, "winreg_RestoreKey");
2851 ndr->depth++;
2852 if (flags & NDR_SET_VALUES) {
2853 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2855 if (flags & NDR_IN) {
2856 ndr_print_struct(ndr, "in", "winreg_RestoreKey");
2857 ndr->depth++;
2858 ndr_print_ptr(ndr, "handle", r->in.handle);
2859 ndr->depth++;
2860 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2861 ndr->depth--;
2862 ndr_print_ptr(ndr, "filename", r->in.filename);
2863 ndr->depth++;
2864 ndr_print_winreg_String(ndr, "filename", r->in.filename);
2865 ndr->depth--;
2866 ndr_print_uint32(ndr, "flags", r->in.flags);
2867 ndr->depth--;
2869 if (flags & NDR_OUT) {
2870 ndr_print_struct(ndr, "out", "winreg_RestoreKey");
2871 ndr->depth++;
2872 ndr_print_WERROR(ndr, "result", r->out.result);
2873 ndr->depth--;
2875 ndr->depth--;
2878 static enum ndr_err_code ndr_push_winreg_SaveKey(struct ndr_push *ndr, int flags, const struct winreg_SaveKey *r)
2880 if (flags & NDR_IN) {
2881 if (r->in.handle == NULL) {
2882 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2884 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2885 if (r->in.filename == NULL) {
2886 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2888 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
2889 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sec_attrib));
2890 if (r->in.sec_attrib) {
2891 NDR_CHECK(ndr_push_KeySecurityAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_attrib));
2894 if (flags & NDR_OUT) {
2895 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2897 return NDR_ERR_SUCCESS;
2900 static enum ndr_err_code ndr_pull_winreg_SaveKey(struct ndr_pull *ndr, int flags, struct winreg_SaveKey *r)
2902 uint32_t _ptr_sec_attrib;
2903 TALLOC_CTX *_mem_save_handle_0;
2904 TALLOC_CTX *_mem_save_filename_0;
2905 TALLOC_CTX *_mem_save_sec_attrib_0;
2906 if (flags & NDR_IN) {
2907 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2908 NDR_PULL_ALLOC(ndr, r->in.handle);
2910 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2911 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2912 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2913 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2914 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2915 NDR_PULL_ALLOC(ndr, r->in.filename);
2917 _mem_save_filename_0 = NDR_PULL_GET_MEM_CTX(ndr);
2918 NDR_PULL_SET_MEM_CTX(ndr, r->in.filename, LIBNDR_FLAG_REF_ALLOC);
2919 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
2920 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filename_0, LIBNDR_FLAG_REF_ALLOC);
2921 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_attrib));
2922 if (_ptr_sec_attrib) {
2923 NDR_PULL_ALLOC(ndr, r->in.sec_attrib);
2924 } else {
2925 r->in.sec_attrib = NULL;
2927 if (r->in.sec_attrib) {
2928 _mem_save_sec_attrib_0 = NDR_PULL_GET_MEM_CTX(ndr);
2929 NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_attrib, 0);
2930 NDR_CHECK(ndr_pull_KeySecurityAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_attrib));
2931 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_attrib_0, 0);
2934 if (flags & NDR_OUT) {
2935 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2937 return NDR_ERR_SUCCESS;
2940 _PUBLIC_ void ndr_print_winreg_SaveKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKey *r)
2942 ndr_print_struct(ndr, name, "winreg_SaveKey");
2943 ndr->depth++;
2944 if (flags & NDR_SET_VALUES) {
2945 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2947 if (flags & NDR_IN) {
2948 ndr_print_struct(ndr, "in", "winreg_SaveKey");
2949 ndr->depth++;
2950 ndr_print_ptr(ndr, "handle", r->in.handle);
2951 ndr->depth++;
2952 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2953 ndr->depth--;
2954 ndr_print_ptr(ndr, "filename", r->in.filename);
2955 ndr->depth++;
2956 ndr_print_winreg_String(ndr, "filename", r->in.filename);
2957 ndr->depth--;
2958 ndr_print_ptr(ndr, "sec_attrib", r->in.sec_attrib);
2959 ndr->depth++;
2960 if (r->in.sec_attrib) {
2961 ndr_print_KeySecurityAttribute(ndr, "sec_attrib", r->in.sec_attrib);
2963 ndr->depth--;
2964 ndr->depth--;
2966 if (flags & NDR_OUT) {
2967 ndr_print_struct(ndr, "out", "winreg_SaveKey");
2968 ndr->depth++;
2969 ndr_print_WERROR(ndr, "result", r->out.result);
2970 ndr->depth--;
2972 ndr->depth--;
2975 static enum ndr_err_code ndr_push_winreg_SetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_SetKeySecurity *r)
2977 if (flags & NDR_IN) {
2978 if (r->in.handle == NULL) {
2979 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2981 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
2982 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
2983 if (r->in.sd == NULL) {
2984 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2986 NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
2988 if (flags & NDR_OUT) {
2989 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2991 return NDR_ERR_SUCCESS;
2994 static enum ndr_err_code ndr_pull_winreg_SetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_SetKeySecurity *r)
2996 TALLOC_CTX *_mem_save_handle_0;
2997 TALLOC_CTX *_mem_save_sd_0;
2998 if (flags & NDR_IN) {
2999 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3000 NDR_PULL_ALLOC(ndr, r->in.handle);
3002 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3003 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3004 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
3005 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3006 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3007 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3008 NDR_PULL_ALLOC(ndr, r->in.sd);
3010 _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
3011 NDR_PULL_SET_MEM_CTX(ndr, r->in.sd, LIBNDR_FLAG_REF_ALLOC);
3012 NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
3013 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, LIBNDR_FLAG_REF_ALLOC);
3015 if (flags & NDR_OUT) {
3016 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3018 return NDR_ERR_SUCCESS;
3021 _PUBLIC_ void ndr_print_winreg_SetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SetKeySecurity *r)
3023 ndr_print_struct(ndr, name, "winreg_SetKeySecurity");
3024 ndr->depth++;
3025 if (flags & NDR_SET_VALUES) {
3026 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3028 if (flags & NDR_IN) {
3029 ndr_print_struct(ndr, "in", "winreg_SetKeySecurity");
3030 ndr->depth++;
3031 ndr_print_ptr(ndr, "handle", r->in.handle);
3032 ndr->depth++;
3033 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3034 ndr->depth--;
3035 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
3036 ndr_print_ptr(ndr, "sd", r->in.sd);
3037 ndr->depth++;
3038 ndr_print_KeySecurityData(ndr, "sd", r->in.sd);
3039 ndr->depth--;
3040 ndr->depth--;
3042 if (flags & NDR_OUT) {
3043 ndr_print_struct(ndr, "out", "winreg_SetKeySecurity");
3044 ndr->depth++;
3045 ndr_print_WERROR(ndr, "result", r->out.result);
3046 ndr->depth--;
3048 ndr->depth--;
3051 static enum ndr_err_code ndr_push_winreg_SetValue(struct ndr_push *ndr, int flags, const struct winreg_SetValue *r)
3053 if (flags & NDR_IN) {
3054 if (r->in.handle == NULL) {
3055 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3057 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
3058 NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
3059 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type));
3060 if (r->in.data == NULL) {
3061 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3063 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.size));
3064 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.size));
3065 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.size));
3067 if (flags & NDR_OUT) {
3068 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3070 return NDR_ERR_SUCCESS;
3073 static enum ndr_err_code ndr_pull_winreg_SetValue(struct ndr_pull *ndr, int flags, struct winreg_SetValue *r)
3075 TALLOC_CTX *_mem_save_handle_0;
3076 if (flags & NDR_IN) {
3077 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3078 NDR_PULL_ALLOC(ndr, r->in.handle);
3080 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3081 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3082 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
3083 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3084 NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
3085 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type));
3086 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
3087 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3088 NDR_PULL_ALLOC_N(ndr, r->in.data, ndr_get_array_size(ndr, &r->in.data));
3090 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, ndr_get_array_size(ndr, &r->in.data)));
3091 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.size));
3092 if (r->in.data) {
3093 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.size));
3096 if (flags & NDR_OUT) {
3097 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3099 return NDR_ERR_SUCCESS;
3102 _PUBLIC_ void ndr_print_winreg_SetValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SetValue *r)
3104 ndr_print_struct(ndr, name, "winreg_SetValue");
3105 ndr->depth++;
3106 if (flags & NDR_SET_VALUES) {
3107 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3109 if (flags & NDR_IN) {
3110 ndr_print_struct(ndr, "in", "winreg_SetValue");
3111 ndr->depth++;
3112 ndr_print_ptr(ndr, "handle", r->in.handle);
3113 ndr->depth++;
3114 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3115 ndr->depth--;
3116 ndr_print_winreg_String(ndr, "name", &r->in.name);
3117 ndr_print_winreg_Type(ndr, "type", r->in.type);
3118 ndr_print_ptr(ndr, "data", r->in.data);
3119 ndr->depth++;
3120 ndr_print_array_uint8(ndr, "data", r->in.data, r->in.size);
3121 ndr->depth--;
3122 ndr_print_uint32(ndr, "size", r->in.size);
3123 ndr->depth--;
3125 if (flags & NDR_OUT) {
3126 ndr_print_struct(ndr, "out", "winreg_SetValue");
3127 ndr->depth++;
3128 ndr_print_WERROR(ndr, "result", r->out.result);
3129 ndr->depth--;
3131 ndr->depth--;
3134 static enum ndr_err_code ndr_push_winreg_UnLoadKey(struct ndr_push *ndr, int flags, const struct winreg_UnLoadKey *r)
3136 if (flags & NDR_IN) {
3138 if (flags & NDR_OUT) {
3139 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3141 return NDR_ERR_SUCCESS;
3144 static enum ndr_err_code ndr_pull_winreg_UnLoadKey(struct ndr_pull *ndr, int flags, struct winreg_UnLoadKey *r)
3146 if (flags & NDR_IN) {
3148 if (flags & NDR_OUT) {
3149 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3151 return NDR_ERR_SUCCESS;
3154 _PUBLIC_ void ndr_print_winreg_UnLoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_UnLoadKey *r)
3156 ndr_print_struct(ndr, name, "winreg_UnLoadKey");
3157 ndr->depth++;
3158 if (flags & NDR_SET_VALUES) {
3159 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3161 if (flags & NDR_IN) {
3162 ndr_print_struct(ndr, "in", "winreg_UnLoadKey");
3163 ndr->depth++;
3164 ndr->depth--;
3166 if (flags & NDR_OUT) {
3167 ndr_print_struct(ndr, "out", "winreg_UnLoadKey");
3168 ndr->depth++;
3169 ndr_print_WERROR(ndr, "result", r->out.result);
3170 ndr->depth--;
3172 ndr->depth--;
3175 static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdown(struct ndr_push *ndr, int flags, const struct winreg_InitiateSystemShutdown *r)
3177 if (flags & NDR_IN) {
3178 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
3179 if (r->in.hostname) {
3180 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.hostname));
3182 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
3183 if (r->in.message) {
3184 NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
3186 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
3187 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
3188 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.reboot));
3190 if (flags & NDR_OUT) {
3191 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3193 return NDR_ERR_SUCCESS;
3196 static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdown(struct ndr_pull *ndr, int flags, struct winreg_InitiateSystemShutdown *r)
3198 uint32_t _ptr_hostname;
3199 uint32_t _ptr_message;
3200 TALLOC_CTX *_mem_save_hostname_0;
3201 TALLOC_CTX *_mem_save_message_0;
3202 if (flags & NDR_IN) {
3203 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hostname));
3204 if (_ptr_hostname) {
3205 NDR_PULL_ALLOC(ndr, r->in.hostname);
3206 } else {
3207 r->in.hostname = NULL;
3209 if (r->in.hostname) {
3210 _mem_save_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
3211 NDR_PULL_SET_MEM_CTX(ndr, r->in.hostname, 0);
3212 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.hostname));
3213 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hostname_0, 0);
3215 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_message));
3216 if (_ptr_message) {
3217 NDR_PULL_ALLOC(ndr, r->in.message);
3218 } else {
3219 r->in.message = NULL;
3221 if (r->in.message) {
3222 _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
3223 NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
3224 NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
3225 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
3227 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
3228 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
3229 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.reboot));
3231 if (flags & NDR_OUT) {
3232 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3234 return NDR_ERR_SUCCESS;
3237 _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdown *r)
3239 ndr_print_struct(ndr, name, "winreg_InitiateSystemShutdown");
3240 ndr->depth++;
3241 if (flags & NDR_SET_VALUES) {
3242 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3244 if (flags & NDR_IN) {
3245 ndr_print_struct(ndr, "in", "winreg_InitiateSystemShutdown");
3246 ndr->depth++;
3247 ndr_print_ptr(ndr, "hostname", r->in.hostname);
3248 ndr->depth++;
3249 if (r->in.hostname) {
3250 ndr_print_uint16(ndr, "hostname", *r->in.hostname);
3252 ndr->depth--;
3253 ndr_print_ptr(ndr, "message", r->in.message);
3254 ndr->depth++;
3255 if (r->in.message) {
3256 ndr_print_initshutdown_String(ndr, "message", r->in.message);
3258 ndr->depth--;
3259 ndr_print_uint32(ndr, "timeout", r->in.timeout);
3260 ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
3261 ndr_print_uint8(ndr, "reboot", r->in.reboot);
3262 ndr->depth--;
3264 if (flags & NDR_OUT) {
3265 ndr_print_struct(ndr, "out", "winreg_InitiateSystemShutdown");
3266 ndr->depth++;
3267 ndr_print_WERROR(ndr, "result", r->out.result);
3268 ndr->depth--;
3270 ndr->depth--;
3273 static enum ndr_err_code ndr_push_winreg_AbortSystemShutdown(struct ndr_push *ndr, int flags, const struct winreg_AbortSystemShutdown *r)
3275 if (flags & NDR_IN) {
3276 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
3277 if (r->in.server) {
3278 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.server));
3281 if (flags & NDR_OUT) {
3282 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3284 return NDR_ERR_SUCCESS;
3287 static enum ndr_err_code ndr_pull_winreg_AbortSystemShutdown(struct ndr_pull *ndr, int flags, struct winreg_AbortSystemShutdown *r)
3289 uint32_t _ptr_server;
3290 TALLOC_CTX *_mem_save_server_0;
3291 if (flags & NDR_IN) {
3292 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
3293 if (_ptr_server) {
3294 NDR_PULL_ALLOC(ndr, r->in.server);
3295 } else {
3296 r->in.server = NULL;
3298 if (r->in.server) {
3299 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
3300 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
3301 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.server));
3302 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
3305 if (flags & NDR_OUT) {
3306 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3308 return NDR_ERR_SUCCESS;
3311 _PUBLIC_ void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_AbortSystemShutdown *r)
3313 ndr_print_struct(ndr, name, "winreg_AbortSystemShutdown");
3314 ndr->depth++;
3315 if (flags & NDR_SET_VALUES) {
3316 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3318 if (flags & NDR_IN) {
3319 ndr_print_struct(ndr, "in", "winreg_AbortSystemShutdown");
3320 ndr->depth++;
3321 ndr_print_ptr(ndr, "server", r->in.server);
3322 ndr->depth++;
3323 if (r->in.server) {
3324 ndr_print_uint16(ndr, "server", *r->in.server);
3326 ndr->depth--;
3327 ndr->depth--;
3329 if (flags & NDR_OUT) {
3330 ndr_print_struct(ndr, "out", "winreg_AbortSystemShutdown");
3331 ndr->depth++;
3332 ndr_print_WERROR(ndr, "result", r->out.result);
3333 ndr->depth--;
3335 ndr->depth--;
3338 static enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r)
3340 if (flags & NDR_IN) {
3341 if (r->in.handle == NULL) {
3342 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3344 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
3346 if (flags & NDR_OUT) {
3347 if (r->out.version == NULL) {
3348 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3350 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.version));
3351 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3353 return NDR_ERR_SUCCESS;
3356 static enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r)
3358 TALLOC_CTX *_mem_save_handle_0;
3359 TALLOC_CTX *_mem_save_version_0;
3360 if (flags & NDR_IN) {
3361 ZERO_STRUCT(r->out);
3363 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3364 NDR_PULL_ALLOC(ndr, r->in.handle);
3366 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3367 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3368 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
3369 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3370 NDR_PULL_ALLOC(ndr, r->out.version);
3371 ZERO_STRUCTP(r->out.version);
3373 if (flags & NDR_OUT) {
3374 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3375 NDR_PULL_ALLOC(ndr, r->out.version);
3377 _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
3378 NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
3379 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.version));
3380 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
3381 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3383 return NDR_ERR_SUCCESS;
3386 _PUBLIC_ void ndr_print_winreg_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetVersion *r)
3388 ndr_print_struct(ndr, name, "winreg_GetVersion");
3389 ndr->depth++;
3390 if (flags & NDR_SET_VALUES) {
3391 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3393 if (flags & NDR_IN) {
3394 ndr_print_struct(ndr, "in", "winreg_GetVersion");
3395 ndr->depth++;
3396 ndr_print_ptr(ndr, "handle", r->in.handle);
3397 ndr->depth++;
3398 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3399 ndr->depth--;
3400 ndr->depth--;
3402 if (flags & NDR_OUT) {
3403 ndr_print_struct(ndr, "out", "winreg_GetVersion");
3404 ndr->depth++;
3405 ndr_print_ptr(ndr, "version", r->out.version);
3406 ndr->depth++;
3407 ndr_print_uint32(ndr, "version", *r->out.version);
3408 ndr->depth--;
3409 ndr_print_WERROR(ndr, "result", r->out.result);
3410 ndr->depth--;
3412 ndr->depth--;
3415 static enum ndr_err_code ndr_push_winreg_OpenHKCC(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCC *r)
3417 if (flags & NDR_IN) {
3418 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
3419 if (r->in.system_name) {
3420 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
3422 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3424 if (flags & NDR_OUT) {
3425 if (r->out.handle == NULL) {
3426 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3428 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
3429 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3431 return NDR_ERR_SUCCESS;
3434 static enum ndr_err_code ndr_pull_winreg_OpenHKCC(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCC *r)
3436 uint32_t _ptr_system_name;
3437 TALLOC_CTX *_mem_save_system_name_0;
3438 TALLOC_CTX *_mem_save_handle_0;
3439 if (flags & NDR_IN) {
3440 ZERO_STRUCT(r->out);
3442 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
3443 if (_ptr_system_name) {
3444 NDR_PULL_ALLOC(ndr, r->in.system_name);
3445 } else {
3446 r->in.system_name = NULL;
3448 if (r->in.system_name) {
3449 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3450 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
3451 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
3452 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
3454 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3455 NDR_PULL_ALLOC(ndr, r->out.handle);
3456 ZERO_STRUCTP(r->out.handle);
3458 if (flags & NDR_OUT) {
3459 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3460 NDR_PULL_ALLOC(ndr, r->out.handle);
3462 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3463 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3464 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
3465 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3466 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3468 return NDR_ERR_SUCCESS;
3471 _PUBLIC_ void ndr_print_winreg_OpenHKCC(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCC *r)
3473 ndr_print_struct(ndr, name, "winreg_OpenHKCC");
3474 ndr->depth++;
3475 if (flags & NDR_SET_VALUES) {
3476 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3478 if (flags & NDR_IN) {
3479 ndr_print_struct(ndr, "in", "winreg_OpenHKCC");
3480 ndr->depth++;
3481 ndr_print_ptr(ndr, "system_name", r->in.system_name);
3482 ndr->depth++;
3483 if (r->in.system_name) {
3484 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
3486 ndr->depth--;
3487 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
3488 ndr->depth--;
3490 if (flags & NDR_OUT) {
3491 ndr_print_struct(ndr, "out", "winreg_OpenHKCC");
3492 ndr->depth++;
3493 ndr_print_ptr(ndr, "handle", r->out.handle);
3494 ndr->depth++;
3495 ndr_print_policy_handle(ndr, "handle", r->out.handle);
3496 ndr->depth--;
3497 ndr_print_WERROR(ndr, "result", r->out.result);
3498 ndr->depth--;
3500 ndr->depth--;
3503 static enum ndr_err_code ndr_push_winreg_OpenHKDD(struct ndr_push *ndr, int flags, const struct winreg_OpenHKDD *r)
3505 if (flags & NDR_IN) {
3506 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
3507 if (r->in.system_name) {
3508 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
3510 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3512 if (flags & NDR_OUT) {
3513 if (r->out.handle == NULL) {
3514 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3516 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
3517 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3519 return NDR_ERR_SUCCESS;
3522 static enum ndr_err_code ndr_pull_winreg_OpenHKDD(struct ndr_pull *ndr, int flags, struct winreg_OpenHKDD *r)
3524 uint32_t _ptr_system_name;
3525 TALLOC_CTX *_mem_save_system_name_0;
3526 TALLOC_CTX *_mem_save_handle_0;
3527 if (flags & NDR_IN) {
3528 ZERO_STRUCT(r->out);
3530 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
3531 if (_ptr_system_name) {
3532 NDR_PULL_ALLOC(ndr, r->in.system_name);
3533 } else {
3534 r->in.system_name = NULL;
3536 if (r->in.system_name) {
3537 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3538 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
3539 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
3540 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
3542 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3543 NDR_PULL_ALLOC(ndr, r->out.handle);
3544 ZERO_STRUCTP(r->out.handle);
3546 if (flags & NDR_OUT) {
3547 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3548 NDR_PULL_ALLOC(ndr, r->out.handle);
3550 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3551 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3552 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
3553 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3554 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3556 return NDR_ERR_SUCCESS;
3559 _PUBLIC_ void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKDD *r)
3561 ndr_print_struct(ndr, name, "winreg_OpenHKDD");
3562 ndr->depth++;
3563 if (flags & NDR_SET_VALUES) {
3564 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3566 if (flags & NDR_IN) {
3567 ndr_print_struct(ndr, "in", "winreg_OpenHKDD");
3568 ndr->depth++;
3569 ndr_print_ptr(ndr, "system_name", r->in.system_name);
3570 ndr->depth++;
3571 if (r->in.system_name) {
3572 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
3574 ndr->depth--;
3575 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
3576 ndr->depth--;
3578 if (flags & NDR_OUT) {
3579 ndr_print_struct(ndr, "out", "winreg_OpenHKDD");
3580 ndr->depth++;
3581 ndr_print_ptr(ndr, "handle", r->out.handle);
3582 ndr->depth++;
3583 ndr_print_policy_handle(ndr, "handle", r->out.handle);
3584 ndr->depth--;
3585 ndr_print_WERROR(ndr, "result", r->out.result);
3586 ndr->depth--;
3588 ndr->depth--;
3591 static enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r)
3593 uint32_t cntr_values_1;
3594 if (flags & NDR_IN) {
3595 if (r->in.key_handle == NULL) {
3596 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3598 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.key_handle));
3599 if (r->in.values == NULL) {
3600 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3602 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
3603 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3604 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
3605 for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
3606 NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_SCALARS, &r->in.values[cntr_values_1]));
3608 for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
3609 NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_BUFFERS, &r->in.values[cntr_values_1]));
3611 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
3612 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
3613 if (r->in.buffer) {
3614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.buffer_size));
3615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.buffer_size));
3617 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, *r->in.buffer_size));
3619 if (r->in.buffer_size == NULL) {
3620 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.buffer_size));
3624 if (flags & NDR_OUT) {
3625 if (r->out.values == NULL) {
3626 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3628 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
3629 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3630 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
3631 for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
3632 NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_SCALARS, &r->out.values[cntr_values_1]));
3634 for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
3635 NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_BUFFERS, &r->out.values[cntr_values_1]));
3637 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.buffer));
3638 if (r->out.buffer) {
3639 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.buffer_size));
3640 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3641 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.buffer_size));
3642 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, *r->out.buffer_size));
3644 if (r->out.buffer_size == NULL) {
3645 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.buffer_size));
3648 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3650 return NDR_ERR_SUCCESS;
3653 static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r)
3655 uint32_t cntr_values_1;
3656 uint32_t _ptr_buffer;
3657 TALLOC_CTX *_mem_save_key_handle_0;
3658 TALLOC_CTX *_mem_save_values_1;
3659 TALLOC_CTX *_mem_save_buffer_0;
3660 TALLOC_CTX *_mem_save_buffer_size_0;
3661 if (flags & NDR_IN) {
3662 ZERO_STRUCT(r->out);
3664 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3665 NDR_PULL_ALLOC(ndr, r->in.key_handle);
3667 _mem_save_key_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3668 NDR_PULL_SET_MEM_CTX(ndr, r->in.key_handle, LIBNDR_FLAG_REF_ALLOC);
3669 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.key_handle));
3670 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_handle_0, LIBNDR_FLAG_REF_ALLOC);
3671 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.values));
3672 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.values));
3673 if (ndr_get_array_length(ndr, &r->in.values) > ndr_get_array_size(ndr, &r->in.values)) {
3674 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.values), ndr_get_array_length(ndr, &r->in.values));
3676 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3677 NDR_PULL_ALLOC_N(ndr, r->in.values, ndr_get_array_size(ndr, &r->in.values));
3679 memcpy(r->out.values, r->in.values, ndr_get_array_size(ndr, &r->in.values) * sizeof(*r->in.values));
3680 _mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
3681 NDR_PULL_SET_MEM_CTX(ndr, r->in.values, 0);
3682 for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
3683 NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_SCALARS, &r->in.values[cntr_values_1]));
3685 for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
3686 NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_BUFFERS, &r->in.values[cntr_values_1]));
3688 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_1, 0);
3689 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_values));
3690 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
3691 if (_ptr_buffer) {
3692 NDR_PULL_ALLOC(ndr, r->in.buffer);
3693 } else {
3694 r->in.buffer = NULL;
3696 if (r->in.buffer) {
3697 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
3698 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
3699 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
3700 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.buffer));
3701 if (ndr_get_array_length(ndr, &r->in.buffer) > ndr_get_array_size(ndr, &r->in.buffer)) {
3702 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.buffer), ndr_get_array_length(ndr, &r->in.buffer));
3704 NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
3705 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_length(ndr, &r->in.buffer)));
3706 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
3708 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3709 NDR_PULL_ALLOC(ndr, r->in.buffer_size);
3711 _mem_save_buffer_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
3712 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer_size, LIBNDR_FLAG_REF_ALLOC);
3713 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
3714 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_size_0, LIBNDR_FLAG_REF_ALLOC);
3715 NDR_PULL_ALLOC_N(ndr, r->out.values, r->in.num_values);
3716 memcpy(r->out.values, r->in.values, (r->in.num_values) * sizeof(*r->in.values));
3717 NDR_PULL_ALLOC(ndr, r->out.buffer_size);
3718 *r->out.buffer_size = *r->in.buffer_size;
3719 if (r->in.values) {
3720 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.values, r->in.num_values));
3722 if (r->in.values) {
3723 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.values, r->in.num_values));
3725 if (r->in.buffer) {
3726 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, *r->in.buffer_size));
3728 if (r->in.buffer) {
3729 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.buffer, *r->in.buffer_size));
3732 if (flags & NDR_OUT) {
3733 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.values));
3734 NDR_CHECK(ndr_pull_array_length(ndr, &r->out.values));
3735 if (ndr_get_array_length(ndr, &r->out.values) > ndr_get_array_size(ndr, &r->out.values)) {
3736 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.values), ndr_get_array_length(ndr, &r->out.values));
3738 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3739 NDR_PULL_ALLOC_N(ndr, r->out.values, ndr_get_array_size(ndr, &r->out.values));
3741 memcpy(r->out.values, r->in.values, ndr_get_array_size(ndr, &r->out.values) * sizeof(*r->in.values));
3742 _mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
3743 NDR_PULL_SET_MEM_CTX(ndr, r->out.values, 0);
3744 for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
3745 NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_SCALARS, &r->out.values[cntr_values_1]));
3747 for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
3748 NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_BUFFERS, &r->out.values[cntr_values_1]));
3750 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_1, 0);
3751 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
3752 if (_ptr_buffer) {
3753 NDR_PULL_ALLOC(ndr, r->out.buffer);
3754 } else {
3755 r->out.buffer = NULL;
3757 if (r->out.buffer) {
3758 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
3759 NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, 0);
3760 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
3761 NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
3762 if (ndr_get_array_length(ndr, &r->out.buffer) > ndr_get_array_size(ndr, &r->out.buffer)) {
3763 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.buffer), ndr_get_array_length(ndr, &r->out.buffer));
3765 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
3766 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_length(ndr, &r->out.buffer)));
3767 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
3769 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3770 NDR_PULL_ALLOC(ndr, r->out.buffer_size);
3772 _mem_save_buffer_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
3773 NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer_size, LIBNDR_FLAG_REF_ALLOC);
3774 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.buffer_size));
3775 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_size_0, LIBNDR_FLAG_REF_ALLOC);
3776 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3777 if (r->out.values) {
3778 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.values, r->in.num_values));
3780 if (r->out.values) {
3781 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.values, r->in.num_values));
3783 if (r->out.buffer) {
3784 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, *r->out.buffer_size));
3786 if (r->out.buffer) {
3787 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.buffer, *r->out.buffer_size));
3790 return NDR_ERR_SUCCESS;
3793 _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues *r)
3795 uint32_t cntr_values_1;
3796 ndr_print_struct(ndr, name, "winreg_QueryMultipleValues");
3797 ndr->depth++;
3798 if (flags & NDR_SET_VALUES) {
3799 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3801 if (flags & NDR_IN) {
3802 ndr_print_struct(ndr, "in", "winreg_QueryMultipleValues");
3803 ndr->depth++;
3804 ndr_print_ptr(ndr, "key_handle", r->in.key_handle);
3805 ndr->depth++;
3806 ndr_print_policy_handle(ndr, "key_handle", r->in.key_handle);
3807 ndr->depth--;
3808 ndr_print_ptr(ndr, "values", r->in.values);
3809 ndr->depth++;
3810 ndr->print(ndr, "%s: ARRAY(%d)", "values", (int)r->in.num_values);
3811 ndr->depth++;
3812 for (cntr_values_1=0;cntr_values_1<r->in.num_values;cntr_values_1++) {
3813 char *idx_1=NULL;
3814 if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) {
3815 ndr_print_QueryMultipleValue(ndr, "values", &r->in.values[cntr_values_1]);
3816 free(idx_1);
3819 ndr->depth--;
3820 ndr->depth--;
3821 ndr_print_uint32(ndr, "num_values", r->in.num_values);
3822 ndr_print_ptr(ndr, "buffer", r->in.buffer);
3823 ndr->depth++;
3824 if (r->in.buffer) {
3825 ndr_print_array_uint8(ndr, "buffer", r->in.buffer, *r->in.buffer_size);
3827 ndr->depth--;
3828 ndr_print_ptr(ndr, "buffer_size", r->in.buffer_size);
3829 ndr->depth++;
3830 ndr_print_uint32(ndr, "buffer_size", *r->in.buffer_size);
3831 ndr->depth--;
3832 ndr->depth--;
3834 if (flags & NDR_OUT) {
3835 ndr_print_struct(ndr, "out", "winreg_QueryMultipleValues");
3836 ndr->depth++;
3837 ndr_print_ptr(ndr, "values", r->out.values);
3838 ndr->depth++;
3839 ndr->print(ndr, "%s: ARRAY(%d)", "values", (int)r->in.num_values);
3840 ndr->depth++;
3841 for (cntr_values_1=0;cntr_values_1<r->in.num_values;cntr_values_1++) {
3842 char *idx_1=NULL;
3843 if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) {
3844 ndr_print_QueryMultipleValue(ndr, "values", &r->out.values[cntr_values_1]);
3845 free(idx_1);
3848 ndr->depth--;
3849 ndr->depth--;
3850 ndr_print_ptr(ndr, "buffer", r->out.buffer);
3851 ndr->depth++;
3852 if (r->out.buffer) {
3853 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, *r->out.buffer_size);
3855 ndr->depth--;
3856 ndr_print_ptr(ndr, "buffer_size", r->out.buffer_size);
3857 ndr->depth++;
3858 ndr_print_uint32(ndr, "buffer_size", *r->out.buffer_size);
3859 ndr->depth--;
3860 ndr_print_WERROR(ndr, "result", r->out.result);
3861 ndr->depth--;
3863 ndr->depth--;
3866 static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdownEx(struct ndr_push *ndr, int flags, const struct winreg_InitiateSystemShutdownEx *r)
3868 if (flags & NDR_IN) {
3869 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
3870 if (r->in.hostname) {
3871 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.hostname));
3873 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
3874 if (r->in.message) {
3875 NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
3877 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
3878 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
3879 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.reboot));
3880 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reason));
3882 if (flags & NDR_OUT) {
3883 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3885 return NDR_ERR_SUCCESS;
3888 static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdownEx(struct ndr_pull *ndr, int flags, struct winreg_InitiateSystemShutdownEx *r)
3890 uint32_t _ptr_hostname;
3891 uint32_t _ptr_message;
3892 TALLOC_CTX *_mem_save_hostname_0;
3893 TALLOC_CTX *_mem_save_message_0;
3894 if (flags & NDR_IN) {
3895 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hostname));
3896 if (_ptr_hostname) {
3897 NDR_PULL_ALLOC(ndr, r->in.hostname);
3898 } else {
3899 r->in.hostname = NULL;
3901 if (r->in.hostname) {
3902 _mem_save_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
3903 NDR_PULL_SET_MEM_CTX(ndr, r->in.hostname, 0);
3904 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.hostname));
3905 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hostname_0, 0);
3907 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_message));
3908 if (_ptr_message) {
3909 NDR_PULL_ALLOC(ndr, r->in.message);
3910 } else {
3911 r->in.message = NULL;
3913 if (r->in.message) {
3914 _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
3915 NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
3916 NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
3917 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
3919 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
3920 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
3921 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.reboot));
3922 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reason));
3924 if (flags & NDR_OUT) {
3925 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3927 return NDR_ERR_SUCCESS;
3930 _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdownEx *r)
3932 ndr_print_struct(ndr, name, "winreg_InitiateSystemShutdownEx");
3933 ndr->depth++;
3934 if (flags & NDR_SET_VALUES) {
3935 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3937 if (flags & NDR_IN) {
3938 ndr_print_struct(ndr, "in", "winreg_InitiateSystemShutdownEx");
3939 ndr->depth++;
3940 ndr_print_ptr(ndr, "hostname", r->in.hostname);
3941 ndr->depth++;
3942 if (r->in.hostname) {
3943 ndr_print_uint16(ndr, "hostname", *r->in.hostname);
3945 ndr->depth--;
3946 ndr_print_ptr(ndr, "message", r->in.message);
3947 ndr->depth++;
3948 if (r->in.message) {
3949 ndr_print_initshutdown_String(ndr, "message", r->in.message);
3951 ndr->depth--;
3952 ndr_print_uint32(ndr, "timeout", r->in.timeout);
3953 ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
3954 ndr_print_uint8(ndr, "reboot", r->in.reboot);
3955 ndr_print_uint32(ndr, "reason", r->in.reason);
3956 ndr->depth--;
3958 if (flags & NDR_OUT) {
3959 ndr_print_struct(ndr, "out", "winreg_InitiateSystemShutdownEx");
3960 ndr->depth++;
3961 ndr_print_WERROR(ndr, "result", r->out.result);
3962 ndr->depth--;
3964 ndr->depth--;
3967 static enum ndr_err_code ndr_push_winreg_SaveKeyEx(struct ndr_push *ndr, int flags, const struct winreg_SaveKeyEx *r)
3969 if (flags & NDR_IN) {
3971 if (flags & NDR_OUT) {
3972 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3974 return NDR_ERR_SUCCESS;
3977 static enum ndr_err_code ndr_pull_winreg_SaveKeyEx(struct ndr_pull *ndr, int flags, struct winreg_SaveKeyEx *r)
3979 if (flags & NDR_IN) {
3981 if (flags & NDR_OUT) {
3982 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3984 return NDR_ERR_SUCCESS;
3987 _PUBLIC_ void ndr_print_winreg_SaveKeyEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKeyEx *r)
3989 ndr_print_struct(ndr, name, "winreg_SaveKeyEx");
3990 ndr->depth++;
3991 if (flags & NDR_SET_VALUES) {
3992 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3994 if (flags & NDR_IN) {
3995 ndr_print_struct(ndr, "in", "winreg_SaveKeyEx");
3996 ndr->depth++;
3997 ndr->depth--;
3999 if (flags & NDR_OUT) {
4000 ndr_print_struct(ndr, "out", "winreg_SaveKeyEx");
4001 ndr->depth++;
4002 ndr_print_WERROR(ndr, "result", r->out.result);
4003 ndr->depth--;
4005 ndr->depth--;
4008 static enum ndr_err_code ndr_push_winreg_OpenHKPT(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPT *r)
4010 if (flags & NDR_IN) {
4011 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
4012 if (r->in.system_name) {
4013 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
4015 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
4017 if (flags & NDR_OUT) {
4018 if (r->out.handle == NULL) {
4019 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4021 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
4022 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4024 return NDR_ERR_SUCCESS;
4027 static enum ndr_err_code ndr_pull_winreg_OpenHKPT(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPT *r)
4029 uint32_t _ptr_system_name;
4030 TALLOC_CTX *_mem_save_system_name_0;
4031 TALLOC_CTX *_mem_save_handle_0;
4032 if (flags & NDR_IN) {
4033 ZERO_STRUCT(r->out);
4035 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
4036 if (_ptr_system_name) {
4037 NDR_PULL_ALLOC(ndr, r->in.system_name);
4038 } else {
4039 r->in.system_name = NULL;
4041 if (r->in.system_name) {
4042 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4043 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
4044 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
4045 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
4047 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
4048 NDR_PULL_ALLOC(ndr, r->out.handle);
4049 ZERO_STRUCTP(r->out.handle);
4051 if (flags & NDR_OUT) {
4052 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4053 NDR_PULL_ALLOC(ndr, r->out.handle);
4055 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4056 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
4057 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
4058 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4059 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4061 return NDR_ERR_SUCCESS;
4064 _PUBLIC_ void ndr_print_winreg_OpenHKPT(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPT *r)
4066 ndr_print_struct(ndr, name, "winreg_OpenHKPT");
4067 ndr->depth++;
4068 if (flags & NDR_SET_VALUES) {
4069 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4071 if (flags & NDR_IN) {
4072 ndr_print_struct(ndr, "in", "winreg_OpenHKPT");
4073 ndr->depth++;
4074 ndr_print_ptr(ndr, "system_name", r->in.system_name);
4075 ndr->depth++;
4076 if (r->in.system_name) {
4077 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
4079 ndr->depth--;
4080 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
4081 ndr->depth--;
4083 if (flags & NDR_OUT) {
4084 ndr_print_struct(ndr, "out", "winreg_OpenHKPT");
4085 ndr->depth++;
4086 ndr_print_ptr(ndr, "handle", r->out.handle);
4087 ndr->depth++;
4088 ndr_print_policy_handle(ndr, "handle", r->out.handle);
4089 ndr->depth--;
4090 ndr_print_WERROR(ndr, "result", r->out.result);
4091 ndr->depth--;
4093 ndr->depth--;
4096 static enum ndr_err_code ndr_push_winreg_OpenHKPN(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPN *r)
4098 if (flags & NDR_IN) {
4099 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
4100 if (r->in.system_name) {
4101 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
4103 NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
4105 if (flags & NDR_OUT) {
4106 if (r->out.handle == NULL) {
4107 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4109 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
4110 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4112 return NDR_ERR_SUCCESS;
4115 static enum ndr_err_code ndr_pull_winreg_OpenHKPN(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPN *r)
4117 uint32_t _ptr_system_name;
4118 TALLOC_CTX *_mem_save_system_name_0;
4119 TALLOC_CTX *_mem_save_handle_0;
4120 if (flags & NDR_IN) {
4121 ZERO_STRUCT(r->out);
4123 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
4124 if (_ptr_system_name) {
4125 NDR_PULL_ALLOC(ndr, r->in.system_name);
4126 } else {
4127 r->in.system_name = NULL;
4129 if (r->in.system_name) {
4130 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4131 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
4132 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
4133 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
4135 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
4136 NDR_PULL_ALLOC(ndr, r->out.handle);
4137 ZERO_STRUCTP(r->out.handle);
4139 if (flags & NDR_OUT) {
4140 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4141 NDR_PULL_ALLOC(ndr, r->out.handle);
4143 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4144 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
4145 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
4146 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4147 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4149 return NDR_ERR_SUCCESS;
4152 _PUBLIC_ void ndr_print_winreg_OpenHKPN(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPN *r)
4154 ndr_print_struct(ndr, name, "winreg_OpenHKPN");
4155 ndr->depth++;
4156 if (flags & NDR_SET_VALUES) {
4157 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4159 if (flags & NDR_IN) {
4160 ndr_print_struct(ndr, "in", "winreg_OpenHKPN");
4161 ndr->depth++;
4162 ndr_print_ptr(ndr, "system_name", r->in.system_name);
4163 ndr->depth++;
4164 if (r->in.system_name) {
4165 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
4167 ndr->depth--;
4168 ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
4169 ndr->depth--;
4171 if (flags & NDR_OUT) {
4172 ndr_print_struct(ndr, "out", "winreg_OpenHKPN");
4173 ndr->depth++;
4174 ndr_print_ptr(ndr, "handle", r->out.handle);
4175 ndr->depth++;
4176 ndr_print_policy_handle(ndr, "handle", r->out.handle);
4177 ndr->depth--;
4178 ndr_print_WERROR(ndr, "result", r->out.result);
4179 ndr->depth--;
4181 ndr->depth--;
4184 static enum ndr_err_code ndr_push_winreg_QueryMultipleValues2(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues2 *r)
4186 if (flags & NDR_IN) {
4188 if (flags & NDR_OUT) {
4189 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4191 return NDR_ERR_SUCCESS;
4194 static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues2(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues2 *r)
4196 if (flags & NDR_IN) {
4198 if (flags & NDR_OUT) {
4199 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4201 return NDR_ERR_SUCCESS;
4204 _PUBLIC_ void ndr_print_winreg_QueryMultipleValues2(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues2 *r)
4206 ndr_print_struct(ndr, name, "winreg_QueryMultipleValues2");
4207 ndr->depth++;
4208 if (flags & NDR_SET_VALUES) {
4209 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4211 if (flags & NDR_IN) {
4212 ndr_print_struct(ndr, "in", "winreg_QueryMultipleValues2");
4213 ndr->depth++;
4214 ndr->depth--;
4216 if (flags & NDR_OUT) {
4217 ndr_print_struct(ndr, "out", "winreg_QueryMultipleValues2");
4218 ndr->depth++;
4219 ndr_print_WERROR(ndr, "result", r->out.result);
4220 ndr->depth--;
4222 ndr->depth--;
4225 static const struct ndr_interface_call winreg_calls[] = {
4227 "winreg_OpenHKCR",
4228 sizeof(struct winreg_OpenHKCR),
4229 (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCR,
4230 (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCR,
4231 (ndr_print_function_t) ndr_print_winreg_OpenHKCR,
4232 false,
4235 "winreg_OpenHKCU",
4236 sizeof(struct winreg_OpenHKCU),
4237 (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCU,
4238 (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCU,
4239 (ndr_print_function_t) ndr_print_winreg_OpenHKCU,
4240 false,
4243 "winreg_OpenHKLM",
4244 sizeof(struct winreg_OpenHKLM),
4245 (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKLM,
4246 (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKLM,
4247 (ndr_print_function_t) ndr_print_winreg_OpenHKLM,
4248 false,
4251 "winreg_OpenHKPD",
4252 sizeof(struct winreg_OpenHKPD),
4253 (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPD,
4254 (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPD,
4255 (ndr_print_function_t) ndr_print_winreg_OpenHKPD,
4256 false,
4259 "winreg_OpenHKU",
4260 sizeof(struct winreg_OpenHKU),
4261 (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKU,
4262 (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKU,
4263 (ndr_print_function_t) ndr_print_winreg_OpenHKU,
4264 false,
4267 "winreg_CloseKey",
4268 sizeof(struct winreg_CloseKey),
4269 (ndr_push_flags_fn_t) ndr_push_winreg_CloseKey,
4270 (ndr_pull_flags_fn_t) ndr_pull_winreg_CloseKey,
4271 (ndr_print_function_t) ndr_print_winreg_CloseKey,
4272 false,
4275 "winreg_CreateKey",
4276 sizeof(struct winreg_CreateKey),
4277 (ndr_push_flags_fn_t) ndr_push_winreg_CreateKey,
4278 (ndr_pull_flags_fn_t) ndr_pull_winreg_CreateKey,
4279 (ndr_print_function_t) ndr_print_winreg_CreateKey,
4280 false,
4283 "winreg_DeleteKey",
4284 sizeof(struct winreg_DeleteKey),
4285 (ndr_push_flags_fn_t) ndr_push_winreg_DeleteKey,
4286 (ndr_pull_flags_fn_t) ndr_pull_winreg_DeleteKey,
4287 (ndr_print_function_t) ndr_print_winreg_DeleteKey,
4288 false,
4291 "winreg_DeleteValue",
4292 sizeof(struct winreg_DeleteValue),
4293 (ndr_push_flags_fn_t) ndr_push_winreg_DeleteValue,
4294 (ndr_pull_flags_fn_t) ndr_pull_winreg_DeleteValue,
4295 (ndr_print_function_t) ndr_print_winreg_DeleteValue,
4296 false,
4299 "winreg_EnumKey",
4300 sizeof(struct winreg_EnumKey),
4301 (ndr_push_flags_fn_t) ndr_push_winreg_EnumKey,
4302 (ndr_pull_flags_fn_t) ndr_pull_winreg_EnumKey,
4303 (ndr_print_function_t) ndr_print_winreg_EnumKey,
4304 false,
4307 "winreg_EnumValue",
4308 sizeof(struct winreg_EnumValue),
4309 (ndr_push_flags_fn_t) ndr_push_winreg_EnumValue,
4310 (ndr_pull_flags_fn_t) ndr_pull_winreg_EnumValue,
4311 (ndr_print_function_t) ndr_print_winreg_EnumValue,
4312 false,
4315 "winreg_FlushKey",
4316 sizeof(struct winreg_FlushKey),
4317 (ndr_push_flags_fn_t) ndr_push_winreg_FlushKey,
4318 (ndr_pull_flags_fn_t) ndr_pull_winreg_FlushKey,
4319 (ndr_print_function_t) ndr_print_winreg_FlushKey,
4320 false,
4323 "winreg_GetKeySecurity",
4324 sizeof(struct winreg_GetKeySecurity),
4325 (ndr_push_flags_fn_t) ndr_push_winreg_GetKeySecurity,
4326 (ndr_pull_flags_fn_t) ndr_pull_winreg_GetKeySecurity,
4327 (ndr_print_function_t) ndr_print_winreg_GetKeySecurity,
4328 false,
4331 "winreg_LoadKey",
4332 sizeof(struct winreg_LoadKey),
4333 (ndr_push_flags_fn_t) ndr_push_winreg_LoadKey,
4334 (ndr_pull_flags_fn_t) ndr_pull_winreg_LoadKey,
4335 (ndr_print_function_t) ndr_print_winreg_LoadKey,
4336 false,
4339 "winreg_NotifyChangeKeyValue",
4340 sizeof(struct winreg_NotifyChangeKeyValue),
4341 (ndr_push_flags_fn_t) ndr_push_winreg_NotifyChangeKeyValue,
4342 (ndr_pull_flags_fn_t) ndr_pull_winreg_NotifyChangeKeyValue,
4343 (ndr_print_function_t) ndr_print_winreg_NotifyChangeKeyValue,
4344 false,
4347 "winreg_OpenKey",
4348 sizeof(struct winreg_OpenKey),
4349 (ndr_push_flags_fn_t) ndr_push_winreg_OpenKey,
4350 (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenKey,
4351 (ndr_print_function_t) ndr_print_winreg_OpenKey,
4352 false,
4355 "winreg_QueryInfoKey",
4356 sizeof(struct winreg_QueryInfoKey),
4357 (ndr_push_flags_fn_t) ndr_push_winreg_QueryInfoKey,
4358 (ndr_pull_flags_fn_t) ndr_pull_winreg_QueryInfoKey,
4359 (ndr_print_function_t) ndr_print_winreg_QueryInfoKey,
4360 false,
4363 "winreg_QueryValue",
4364 sizeof(struct winreg_QueryValue),
4365 (ndr_push_flags_fn_t) ndr_push_winreg_QueryValue,
4366 (ndr_pull_flags_fn_t) ndr_pull_winreg_QueryValue,
4367 (ndr_print_function_t) ndr_print_winreg_QueryValue,
4368 false,
4371 "winreg_ReplaceKey",
4372 sizeof(struct winreg_ReplaceKey),
4373 (ndr_push_flags_fn_t) ndr_push_winreg_ReplaceKey,
4374 (ndr_pull_flags_fn_t) ndr_pull_winreg_ReplaceKey,
4375 (ndr_print_function_t) ndr_print_winreg_ReplaceKey,
4376 false,
4379 "winreg_RestoreKey",
4380 sizeof(struct winreg_RestoreKey),
4381 (ndr_push_flags_fn_t) ndr_push_winreg_RestoreKey,
4382 (ndr_pull_flags_fn_t) ndr_pull_winreg_RestoreKey,
4383 (ndr_print_function_t) ndr_print_winreg_RestoreKey,
4384 false,
4387 "winreg_SaveKey",
4388 sizeof(struct winreg_SaveKey),
4389 (ndr_push_flags_fn_t) ndr_push_winreg_SaveKey,
4390 (ndr_pull_flags_fn_t) ndr_pull_winreg_SaveKey,
4391 (ndr_print_function_t) ndr_print_winreg_SaveKey,
4392 false,
4395 "winreg_SetKeySecurity",
4396 sizeof(struct winreg_SetKeySecurity),
4397 (ndr_push_flags_fn_t) ndr_push_winreg_SetKeySecurity,
4398 (ndr_pull_flags_fn_t) ndr_pull_winreg_SetKeySecurity,
4399 (ndr_print_function_t) ndr_print_winreg_SetKeySecurity,
4400 false,
4403 "winreg_SetValue",
4404 sizeof(struct winreg_SetValue),
4405 (ndr_push_flags_fn_t) ndr_push_winreg_SetValue,
4406 (ndr_pull_flags_fn_t) ndr_pull_winreg_SetValue,
4407 (ndr_print_function_t) ndr_print_winreg_SetValue,
4408 false,
4411 "winreg_UnLoadKey",
4412 sizeof(struct winreg_UnLoadKey),
4413 (ndr_push_flags_fn_t) ndr_push_winreg_UnLoadKey,
4414 (ndr_pull_flags_fn_t) ndr_pull_winreg_UnLoadKey,
4415 (ndr_print_function_t) ndr_print_winreg_UnLoadKey,
4416 false,
4419 "winreg_InitiateSystemShutdown",
4420 sizeof(struct winreg_InitiateSystemShutdown),
4421 (ndr_push_flags_fn_t) ndr_push_winreg_InitiateSystemShutdown,
4422 (ndr_pull_flags_fn_t) ndr_pull_winreg_InitiateSystemShutdown,
4423 (ndr_print_function_t) ndr_print_winreg_InitiateSystemShutdown,
4424 false,
4427 "winreg_AbortSystemShutdown",
4428 sizeof(struct winreg_AbortSystemShutdown),
4429 (ndr_push_flags_fn_t) ndr_push_winreg_AbortSystemShutdown,
4430 (ndr_pull_flags_fn_t) ndr_pull_winreg_AbortSystemShutdown,
4431 (ndr_print_function_t) ndr_print_winreg_AbortSystemShutdown,
4432 false,
4435 "winreg_GetVersion",
4436 sizeof(struct winreg_GetVersion),
4437 (ndr_push_flags_fn_t) ndr_push_winreg_GetVersion,
4438 (ndr_pull_flags_fn_t) ndr_pull_winreg_GetVersion,
4439 (ndr_print_function_t) ndr_print_winreg_GetVersion,
4440 false,
4443 "winreg_OpenHKCC",
4444 sizeof(struct winreg_OpenHKCC),
4445 (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCC,
4446 (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCC,
4447 (ndr_print_function_t) ndr_print_winreg_OpenHKCC,
4448 false,
4451 "winreg_OpenHKDD",
4452 sizeof(struct winreg_OpenHKDD),
4453 (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKDD,
4454 (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKDD,
4455 (ndr_print_function_t) ndr_print_winreg_OpenHKDD,
4456 false,
4459 "winreg_QueryMultipleValues",
4460 sizeof(struct winreg_QueryMultipleValues),
4461 (ndr_push_flags_fn_t) ndr_push_winreg_QueryMultipleValues,
4462 (ndr_pull_flags_fn_t) ndr_pull_winreg_QueryMultipleValues,
4463 (ndr_print_function_t) ndr_print_winreg_QueryMultipleValues,
4464 false,
4467 "winreg_InitiateSystemShutdownEx",
4468 sizeof(struct winreg_InitiateSystemShutdownEx),
4469 (ndr_push_flags_fn_t) ndr_push_winreg_InitiateSystemShutdownEx,
4470 (ndr_pull_flags_fn_t) ndr_pull_winreg_InitiateSystemShutdownEx,
4471 (ndr_print_function_t) ndr_print_winreg_InitiateSystemShutdownEx,
4472 false,
4475 "winreg_SaveKeyEx",
4476 sizeof(struct winreg_SaveKeyEx),
4477 (ndr_push_flags_fn_t) ndr_push_winreg_SaveKeyEx,
4478 (ndr_pull_flags_fn_t) ndr_pull_winreg_SaveKeyEx,
4479 (ndr_print_function_t) ndr_print_winreg_SaveKeyEx,
4480 false,
4483 "winreg_OpenHKPT",
4484 sizeof(struct winreg_OpenHKPT),
4485 (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPT,
4486 (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPT,
4487 (ndr_print_function_t) ndr_print_winreg_OpenHKPT,
4488 false,
4491 "winreg_OpenHKPN",
4492 sizeof(struct winreg_OpenHKPN),
4493 (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPN,
4494 (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPN,
4495 (ndr_print_function_t) ndr_print_winreg_OpenHKPN,
4496 false,
4499 "winreg_QueryMultipleValues2",
4500 sizeof(struct winreg_QueryMultipleValues2),
4501 (ndr_push_flags_fn_t) ndr_push_winreg_QueryMultipleValues2,
4502 (ndr_pull_flags_fn_t) ndr_pull_winreg_QueryMultipleValues2,
4503 (ndr_print_function_t) ndr_print_winreg_QueryMultipleValues2,
4504 false,
4506 { NULL, 0, NULL, NULL, NULL, false }
4509 static const char * const winreg_endpoint_strings[] = {
4510 "ncacn_np:[\\pipe\\winreg]",
4511 "ncacn_ip_tcp:",
4512 "ncalrpc:",
4515 static const struct ndr_interface_string_array winreg_endpoints = {
4516 .count = 3,
4517 .names = winreg_endpoint_strings
4520 static const char * const winreg_authservice_strings[] = {
4521 "host",
4524 static const struct ndr_interface_string_array winreg_authservices = {
4525 .count = 1,
4526 .names = winreg_authservice_strings
4530 const struct ndr_interface_table ndr_table_winreg = {
4531 .name = "winreg",
4532 .syntax_id = {
4533 {0x338cd001,0x2244,0x31f1,{0xaa,0xaa},{0x90,0x00,0x38,0x00,0x10,0x03}},
4534 NDR_WINREG_VERSION
4536 .helpstring = NDR_WINREG_HELPSTRING,
4537 .num_calls = 35,
4538 .calls = winreg_calls,
4539 .endpoints = &winreg_endpoints,
4540 .authservices = &winreg_authservices