1 /* parser auto-generated by pidl */
4 #include "../librpc/gen_ndr/ndr_winreg.h"
6 #include "librpc/gen_ndr/ndr_lsa.h"
7 #include "librpc/gen_ndr/ndr_security.h"
8 static enum ndr_err_code
ndr_push_winreg_AccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
10 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
11 return NDR_ERR_SUCCESS
;
14 static enum ndr_err_code
ndr_pull_winreg_AccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
17 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
19 return NDR_ERR_SUCCESS
;
22 _PUBLIC_
void ndr_print_winreg_AccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
24 ndr_print_uint32(ndr
, name
, r
);
26 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "KEY_QUERY_VALUE", KEY_QUERY_VALUE
, r
);
27 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "KEY_SET_VALUE", KEY_SET_VALUE
, r
);
28 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "KEY_CREATE_SUB_KEY", KEY_CREATE_SUB_KEY
, r
);
29 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "KEY_ENUMERATE_SUB_KEYS", KEY_ENUMERATE_SUB_KEYS
, r
);
30 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "KEY_NOTIFY", KEY_NOTIFY
, r
);
31 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "KEY_CREATE_LINK", KEY_CREATE_LINK
, r
);
32 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "KEY_WOW64_64KEY", KEY_WOW64_64KEY
, r
);
33 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "KEY_WOW64_32KEY", KEY_WOW64_32KEY
, r
);
37 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_Type(struct ndr_push
*ndr
, int ndr_flags
, enum winreg_Type r
)
39 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
40 return NDR_ERR_SUCCESS
;
43 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_Type(struct ndr_pull
*ndr
, int ndr_flags
, enum winreg_Type
*r
)
46 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
48 return NDR_ERR_SUCCESS
;
51 _PUBLIC_
void ndr_print_winreg_Type(struct ndr_print
*ndr
, const char *name
, enum winreg_Type r
)
53 const char *val
= NULL
;
56 case REG_NONE
: val
= "REG_NONE"; break;
57 case REG_SZ
: val
= "REG_SZ"; break;
58 case REG_EXPAND_SZ
: val
= "REG_EXPAND_SZ"; break;
59 case REG_BINARY
: val
= "REG_BINARY"; break;
60 case REG_DWORD
: val
= "REG_DWORD"; break;
61 case REG_DWORD_BIG_ENDIAN
: val
= "REG_DWORD_BIG_ENDIAN"; break;
62 case REG_LINK
: val
= "REG_LINK"; break;
63 case REG_MULTI_SZ
: val
= "REG_MULTI_SZ"; break;
64 case REG_RESOURCE_LIST
: val
= "REG_RESOURCE_LIST"; break;
65 case REG_FULL_RESOURCE_DESCRIPTOR
: val
= "REG_FULL_RESOURCE_DESCRIPTOR"; break;
66 case REG_RESOURCE_REQUIREMENTS_LIST
: val
= "REG_RESOURCE_REQUIREMENTS_LIST"; break;
67 case REG_QWORD
: val
= "REG_QWORD"; break;
69 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
72 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_String(struct ndr_push
*ndr
, int ndr_flags
, const struct winreg_String
*r
)
74 if (ndr_flags
& NDR_SCALARS
) {
75 NDR_CHECK(ndr_push_align(ndr
, 4));
76 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m_term(r
->name
) * 2));
77 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m_term(r
->name
) * 2));
78 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->name
));
80 if (ndr_flags
& NDR_BUFFERS
) {
82 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
83 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
84 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
85 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->name
, ndr_charset_length(r
->name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
88 return NDR_ERR_SUCCESS
;
91 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_String(struct ndr_pull
*ndr
, int ndr_flags
, struct winreg_String
*r
)
94 TALLOC_CTX
*_mem_save_name_0
;
95 if (ndr_flags
& NDR_SCALARS
) {
96 NDR_CHECK(ndr_pull_align(ndr
, 4));
97 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->name_len
));
98 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->name_size
));
99 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
101 NDR_PULL_ALLOC(ndr
, r
->name
);
106 if (ndr_flags
& NDR_BUFFERS
) {
108 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
109 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
110 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->name
));
111 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->name
));
112 if (ndr_get_array_length(ndr
, &r
->name
) > ndr_get_array_size(ndr
, &r
->name
)) {
113 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
));
115 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t)));
116 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->name
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t), CH_UTF16
));
117 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
120 return NDR_ERR_SUCCESS
;
123 _PUBLIC_
void ndr_print_winreg_String(struct ndr_print
*ndr
, const char *name
, const struct winreg_String
*r
)
125 ndr_print_struct(ndr
, name
, "winreg_String");
127 ndr_print_uint16(ndr
, "name_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m_term(r
->name
) * 2:r
->name_len
);
128 ndr_print_uint16(ndr
, "name_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m_term(r
->name
) * 2:r
->name_size
);
129 ndr_print_ptr(ndr
, "name", r
->name
);
132 ndr_print_string(ndr
, "name", r
->name
);
138 static enum ndr_err_code
ndr_push_KeySecurityData(struct ndr_push
*ndr
, int ndr_flags
, const struct KeySecurityData
*r
)
140 if (ndr_flags
& NDR_SCALARS
) {
141 NDR_CHECK(ndr_push_align(ndr
, 4));
142 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
143 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
144 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->len
));
146 if (ndr_flags
& NDR_BUFFERS
) {
148 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
149 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
150 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->len
));
151 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->len
));
154 return NDR_ERR_SUCCESS
;
157 static enum ndr_err_code
ndr_pull_KeySecurityData(struct ndr_pull
*ndr
, int ndr_flags
, struct KeySecurityData
*r
)
160 TALLOC_CTX
*_mem_save_data_0
;
161 if (ndr_flags
& NDR_SCALARS
) {
162 NDR_CHECK(ndr_pull_align(ndr
, 4));
163 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
165 NDR_PULL_ALLOC(ndr
, r
->data
);
169 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
170 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->len
));
172 if (ndr_flags
& NDR_BUFFERS
) {
174 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
175 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
176 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
177 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data
));
178 if (ndr_get_array_length(ndr
, &r
->data
) > ndr_get_array_size(ndr
, &r
->data
)) {
179 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
));
181 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
182 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_length(ndr
, &r
->data
)));
183 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
186 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
));
189 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->data
, r
->len
));
192 return NDR_ERR_SUCCESS
;
195 _PUBLIC_
void ndr_print_KeySecurityData(struct ndr_print
*ndr
, const char *name
, const struct KeySecurityData
*r
)
197 ndr_print_struct(ndr
, name
, "KeySecurityData");
199 ndr_print_ptr(ndr
, "data", r
->data
);
202 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->len
);
205 ndr_print_uint32(ndr
, "size", r
->size
);
206 ndr_print_uint32(ndr
, "len", r
->len
);
210 static enum ndr_err_code
ndr_push_winreg_SecBuf(struct ndr_push
*ndr
, int ndr_flags
, const struct winreg_SecBuf
*r
)
212 if (ndr_flags
& NDR_SCALARS
) {
213 NDR_CHECK(ndr_push_align(ndr
, 4));
214 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
215 NDR_CHECK(ndr_push_KeySecurityData(ndr
, NDR_SCALARS
, &r
->sd
));
216 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->inherit
));
218 if (ndr_flags
& NDR_BUFFERS
) {
219 NDR_CHECK(ndr_push_KeySecurityData(ndr
, NDR_BUFFERS
, &r
->sd
));
221 return NDR_ERR_SUCCESS
;
224 static enum ndr_err_code
ndr_pull_winreg_SecBuf(struct ndr_pull
*ndr
, int ndr_flags
, struct winreg_SecBuf
*r
)
226 if (ndr_flags
& NDR_SCALARS
) {
227 NDR_CHECK(ndr_pull_align(ndr
, 4));
228 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
229 NDR_CHECK(ndr_pull_KeySecurityData(ndr
, NDR_SCALARS
, &r
->sd
));
230 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->inherit
));
232 if (ndr_flags
& NDR_BUFFERS
) {
233 NDR_CHECK(ndr_pull_KeySecurityData(ndr
, NDR_BUFFERS
, &r
->sd
));
235 return NDR_ERR_SUCCESS
;
238 _PUBLIC_
void ndr_print_winreg_SecBuf(struct ndr_print
*ndr
, const char *name
, const struct winreg_SecBuf
*r
)
240 ndr_print_struct(ndr
, name
, "winreg_SecBuf");
242 ndr_print_uint32(ndr
, "length", r
->length
);
243 ndr_print_KeySecurityData(ndr
, "sd", &r
->sd
);
244 ndr_print_uint8(ndr
, "inherit", r
->inherit
);
248 static enum ndr_err_code
ndr_push_winreg_CreateAction(struct ndr_push
*ndr
, int ndr_flags
, enum winreg_CreateAction r
)
250 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
251 return NDR_ERR_SUCCESS
;
254 static enum ndr_err_code
ndr_pull_winreg_CreateAction(struct ndr_pull
*ndr
, int ndr_flags
, enum winreg_CreateAction
*r
)
257 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
259 return NDR_ERR_SUCCESS
;
262 _PUBLIC_
void ndr_print_winreg_CreateAction(struct ndr_print
*ndr
, const char *name
, enum winreg_CreateAction r
)
264 const char *val
= NULL
;
267 case REG_ACTION_NONE
: val
= "REG_ACTION_NONE"; break;
268 case REG_CREATED_NEW_KEY
: val
= "REG_CREATED_NEW_KEY"; break;
269 case REG_OPENED_EXISTING_KEY
: val
= "REG_OPENED_EXISTING_KEY"; break;
271 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
274 static enum ndr_err_code
ndr_push_winreg_StringBuf(struct ndr_push
*ndr
, int ndr_flags
, const struct winreg_StringBuf
*r
)
276 if (ndr_flags
& NDR_SCALARS
) {
277 NDR_CHECK(ndr_push_align(ndr
, 4));
278 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m_term_null(r
->name
) * 2));
279 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->size
));
280 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->name
));
282 if (ndr_flags
& NDR_BUFFERS
) {
284 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
/ 2));
285 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
286 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m_term_null(r
->name
) * 2 / 2));
287 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->name
, strlen_m_term_null(r
->name
) * 2 / 2, sizeof(uint16_t), CH_UTF16
));
290 return NDR_ERR_SUCCESS
;
293 static enum ndr_err_code
ndr_pull_winreg_StringBuf(struct ndr_pull
*ndr
, int ndr_flags
, struct winreg_StringBuf
*r
)
296 TALLOC_CTX
*_mem_save_name_0
;
297 if (ndr_flags
& NDR_SCALARS
) {
298 NDR_CHECK(ndr_pull_align(ndr
, 4));
299 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
300 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
301 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
303 NDR_PULL_ALLOC(ndr
, r
->name
);
308 if (ndr_flags
& NDR_BUFFERS
) {
310 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
311 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
312 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->name
));
313 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->name
));
314 if (ndr_get_array_length(ndr
, &r
->name
) > ndr_get_array_size(ndr
, &r
->name
)) {
315 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
));
317 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->name
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t), CH_UTF16
));
318 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
321 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->name
, r
->size
/ 2));
324 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->name
, r
->length
/ 2));
327 return NDR_ERR_SUCCESS
;
330 _PUBLIC_
void ndr_print_winreg_StringBuf(struct ndr_print
*ndr
, const char *name
, const struct winreg_StringBuf
*r
)
332 ndr_print_struct(ndr
, name
, "winreg_StringBuf");
334 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m_term_null(r
->name
) * 2:r
->length
);
335 ndr_print_uint16(ndr
, "size", r
->size
);
336 ndr_print_ptr(ndr
, "name", r
->name
);
339 ndr_print_string(ndr
, "name", r
->name
);
345 static enum ndr_err_code
ndr_push_winreg_ValNameBuf(struct ndr_push
*ndr
, int ndr_flags
, const struct winreg_ValNameBuf
*r
)
347 if (ndr_flags
& NDR_SCALARS
) {
348 NDR_CHECK(ndr_push_align(ndr
, 4));
349 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m_term(r
->name
) * 2));
350 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->size
));
351 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->name
));
353 if (ndr_flags
& NDR_BUFFERS
) {
355 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
/ 2));
356 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
357 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m_term(r
->name
) * 2 / 2));
358 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->name
, strlen_m_term(r
->name
) * 2 / 2, sizeof(uint16_t), CH_UTF16
));
361 return NDR_ERR_SUCCESS
;
364 static enum ndr_err_code
ndr_pull_winreg_ValNameBuf(struct ndr_pull
*ndr
, int ndr_flags
, struct winreg_ValNameBuf
*r
)
367 TALLOC_CTX
*_mem_save_name_0
;
368 if (ndr_flags
& NDR_SCALARS
) {
369 NDR_CHECK(ndr_pull_align(ndr
, 4));
370 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
371 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
372 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
374 NDR_PULL_ALLOC(ndr
, r
->name
);
379 if (ndr_flags
& NDR_BUFFERS
) {
381 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
382 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
383 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->name
));
384 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->name
));
385 if (ndr_get_array_length(ndr
, &r
->name
) > ndr_get_array_size(ndr
, &r
->name
)) {
386 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
));
388 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->name
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t), CH_UTF16
));
389 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
392 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->name
, r
->size
/ 2));
395 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->name
, r
->length
/ 2));
398 return NDR_ERR_SUCCESS
;
401 _PUBLIC_
void ndr_print_winreg_ValNameBuf(struct ndr_print
*ndr
, const char *name
, const struct winreg_ValNameBuf
*r
)
403 ndr_print_struct(ndr
, name
, "winreg_ValNameBuf");
405 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m_term(r
->name
) * 2:r
->length
);
406 ndr_print_uint16(ndr
, "size", r
->size
);
407 ndr_print_ptr(ndr
, "name", r
->name
);
410 ndr_print_string(ndr
, "name", r
->name
);
416 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_NotifyChangeType(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
418 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
419 return NDR_ERR_SUCCESS
;
422 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_NotifyChangeType(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
425 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
427 return NDR_ERR_SUCCESS
;
430 _PUBLIC_
void ndr_print_winreg_NotifyChangeType(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
432 ndr_print_uint32(ndr
, name
, r
);
434 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "REG_NOTIFY_CHANGE_NAME", REG_NOTIFY_CHANGE_NAME
, r
);
435 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "REG_NOTIFY_CHANGE_ATTRIBUTES", REG_NOTIFY_CHANGE_ATTRIBUTES
, r
);
436 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "REG_NOTIFY_CHANGE_LAST_SET", REG_NOTIFY_CHANGE_LAST_SET
, r
);
437 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "REG_NOTIFY_CHANGE_SECURITY", REG_NOTIFY_CHANGE_SECURITY
, r
);
441 static enum ndr_err_code
ndr_push_KeySecurityAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct KeySecurityAttribute
*r
)
443 if (ndr_flags
& NDR_SCALARS
) {
444 NDR_CHECK(ndr_push_align(ndr
, 4));
445 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->data_size
));
446 NDR_CHECK(ndr_push_KeySecurityData(ndr
, NDR_SCALARS
, &r
->sec_data
));
447 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->inherit
));
449 if (ndr_flags
& NDR_BUFFERS
) {
450 NDR_CHECK(ndr_push_KeySecurityData(ndr
, NDR_BUFFERS
, &r
->sec_data
));
452 return NDR_ERR_SUCCESS
;
455 static enum ndr_err_code
ndr_pull_KeySecurityAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct KeySecurityAttribute
*r
)
457 if (ndr_flags
& NDR_SCALARS
) {
458 NDR_CHECK(ndr_pull_align(ndr
, 4));
459 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->data_size
));
460 NDR_CHECK(ndr_pull_KeySecurityData(ndr
, NDR_SCALARS
, &r
->sec_data
));
461 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->inherit
));
463 if (ndr_flags
& NDR_BUFFERS
) {
464 NDR_CHECK(ndr_pull_KeySecurityData(ndr
, NDR_BUFFERS
, &r
->sec_data
));
466 return NDR_ERR_SUCCESS
;
469 _PUBLIC_
void ndr_print_KeySecurityAttribute(struct ndr_print
*ndr
, const char *name
, const struct KeySecurityAttribute
*r
)
471 ndr_print_struct(ndr
, name
, "KeySecurityAttribute");
473 ndr_print_uint32(ndr
, "data_size", r
->data_size
);
474 ndr_print_KeySecurityData(ndr
, "sec_data", &r
->sec_data
);
475 ndr_print_uint8(ndr
, "inherit", r
->inherit
);
479 static enum ndr_err_code
ndr_push_QueryMultipleValue(struct ndr_push
*ndr
, int ndr_flags
, const struct QueryMultipleValue
*r
)
481 if (ndr_flags
& NDR_SCALARS
) {
482 NDR_CHECK(ndr_push_align(ndr
, 4));
483 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->name
));
484 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->type
));
485 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->offset
));
486 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
488 if (ndr_flags
& NDR_BUFFERS
) {
490 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->name
));
493 return NDR_ERR_SUCCESS
;
496 static enum ndr_err_code
ndr_pull_QueryMultipleValue(struct ndr_pull
*ndr
, int ndr_flags
, struct QueryMultipleValue
*r
)
499 TALLOC_CTX
*_mem_save_name_0
;
500 if (ndr_flags
& NDR_SCALARS
) {
501 NDR_CHECK(ndr_pull_align(ndr
, 4));
502 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
504 NDR_PULL_ALLOC(ndr
, r
->name
);
508 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, &r
->type
));
509 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->offset
));
510 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
512 if (ndr_flags
& NDR_BUFFERS
) {
514 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
515 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
516 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->name
));
517 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
520 return NDR_ERR_SUCCESS
;
523 _PUBLIC_
void ndr_print_QueryMultipleValue(struct ndr_print
*ndr
, const char *name
, const struct QueryMultipleValue
*r
)
525 ndr_print_struct(ndr
, name
, "QueryMultipleValue");
527 ndr_print_ptr(ndr
, "name", r
->name
);
530 ndr_print_winreg_String(ndr
, "name", r
->name
);
533 ndr_print_winreg_Type(ndr
, "type", r
->type
);
534 ndr_print_uint32(ndr
, "offset", r
->offset
);
535 ndr_print_uint32(ndr
, "length", r
->length
);
539 static enum ndr_err_code
ndr_push_winreg_OpenHKCR(struct ndr_push
*ndr
, int flags
, const struct winreg_OpenHKCR
*r
)
541 if (flags
& NDR_IN
) {
542 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
543 if (r
->in
.system_name
) {
544 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
546 NDR_CHECK(ndr_push_winreg_AccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
548 if (flags
& NDR_OUT
) {
549 if (r
->out
.handle
== NULL
) {
550 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
552 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
553 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
555 return NDR_ERR_SUCCESS
;
558 static enum ndr_err_code
ndr_pull_winreg_OpenHKCR(struct ndr_pull
*ndr
, int flags
, struct winreg_OpenHKCR
*r
)
560 uint32_t _ptr_system_name
;
561 TALLOC_CTX
*_mem_save_system_name_0
;
562 TALLOC_CTX
*_mem_save_handle_0
;
563 if (flags
& NDR_IN
) {
566 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
567 if (_ptr_system_name
) {
568 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
570 r
->in
.system_name
= NULL
;
572 if (r
->in
.system_name
) {
573 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
574 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
575 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
576 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
578 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
579 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
580 ZERO_STRUCTP(r
->out
.handle
);
582 if (flags
& NDR_OUT
) {
583 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
584 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
586 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
587 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
588 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
589 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
590 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
592 return NDR_ERR_SUCCESS
;
595 _PUBLIC_
void ndr_print_winreg_OpenHKCR(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_OpenHKCR
*r
)
597 ndr_print_struct(ndr
, name
, "winreg_OpenHKCR");
599 if (flags
& NDR_SET_VALUES
) {
600 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
602 if (flags
& NDR_IN
) {
603 ndr_print_struct(ndr
, "in", "winreg_OpenHKCR");
605 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
607 if (r
->in
.system_name
) {
608 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
611 ndr_print_winreg_AccessMask(ndr
, "access_mask", r
->in
.access_mask
);
614 if (flags
& NDR_OUT
) {
615 ndr_print_struct(ndr
, "out", "winreg_OpenHKCR");
617 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
619 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
621 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
627 static enum ndr_err_code
ndr_push_winreg_OpenHKCU(struct ndr_push
*ndr
, int flags
, const struct winreg_OpenHKCU
*r
)
629 if (flags
& NDR_IN
) {
630 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
631 if (r
->in
.system_name
) {
632 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
634 NDR_CHECK(ndr_push_winreg_AccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
636 if (flags
& NDR_OUT
) {
637 if (r
->out
.handle
== NULL
) {
638 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
640 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
641 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
643 return NDR_ERR_SUCCESS
;
646 static enum ndr_err_code
ndr_pull_winreg_OpenHKCU(struct ndr_pull
*ndr
, int flags
, struct winreg_OpenHKCU
*r
)
648 uint32_t _ptr_system_name
;
649 TALLOC_CTX
*_mem_save_system_name_0
;
650 TALLOC_CTX
*_mem_save_handle_0
;
651 if (flags
& NDR_IN
) {
654 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
655 if (_ptr_system_name
) {
656 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
658 r
->in
.system_name
= NULL
;
660 if (r
->in
.system_name
) {
661 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
662 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
663 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
664 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
666 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
667 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
668 ZERO_STRUCTP(r
->out
.handle
);
670 if (flags
& NDR_OUT
) {
671 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
672 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
674 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
675 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
676 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
677 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
678 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
680 return NDR_ERR_SUCCESS
;
683 _PUBLIC_
void ndr_print_winreg_OpenHKCU(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_OpenHKCU
*r
)
685 ndr_print_struct(ndr
, name
, "winreg_OpenHKCU");
687 if (flags
& NDR_SET_VALUES
) {
688 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
690 if (flags
& NDR_IN
) {
691 ndr_print_struct(ndr
, "in", "winreg_OpenHKCU");
693 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
695 if (r
->in
.system_name
) {
696 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
699 ndr_print_winreg_AccessMask(ndr
, "access_mask", r
->in
.access_mask
);
702 if (flags
& NDR_OUT
) {
703 ndr_print_struct(ndr
, "out", "winreg_OpenHKCU");
705 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
707 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
709 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
715 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_OpenHKLM(struct ndr_push
*ndr
, int flags
, const struct winreg_OpenHKLM
*r
)
717 if (flags
& NDR_IN
) {
718 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
719 if (r
->in
.system_name
) {
720 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
722 NDR_CHECK(ndr_push_winreg_AccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
724 if (flags
& NDR_OUT
) {
725 if (r
->out
.handle
== NULL
) {
726 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
728 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
729 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
731 return NDR_ERR_SUCCESS
;
734 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_OpenHKLM(struct ndr_pull
*ndr
, int flags
, struct winreg_OpenHKLM
*r
)
736 uint32_t _ptr_system_name
;
737 TALLOC_CTX
*_mem_save_system_name_0
;
738 TALLOC_CTX
*_mem_save_handle_0
;
739 if (flags
& NDR_IN
) {
742 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
743 if (_ptr_system_name
) {
744 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
746 r
->in
.system_name
= NULL
;
748 if (r
->in
.system_name
) {
749 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
750 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
751 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
752 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
754 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
755 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
756 ZERO_STRUCTP(r
->out
.handle
);
758 if (flags
& NDR_OUT
) {
759 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
760 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
762 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
763 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
764 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
765 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
766 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
768 return NDR_ERR_SUCCESS
;
771 _PUBLIC_
void ndr_print_winreg_OpenHKLM(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_OpenHKLM
*r
)
773 ndr_print_struct(ndr
, name
, "winreg_OpenHKLM");
775 if (flags
& NDR_SET_VALUES
) {
776 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
778 if (flags
& NDR_IN
) {
779 ndr_print_struct(ndr
, "in", "winreg_OpenHKLM");
781 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
783 if (r
->in
.system_name
) {
784 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
787 ndr_print_winreg_AccessMask(ndr
, "access_mask", r
->in
.access_mask
);
790 if (flags
& NDR_OUT
) {
791 ndr_print_struct(ndr
, "out", "winreg_OpenHKLM");
793 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
795 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
797 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
803 static enum ndr_err_code
ndr_push_winreg_OpenHKPD(struct ndr_push
*ndr
, int flags
, const struct winreg_OpenHKPD
*r
)
805 if (flags
& NDR_IN
) {
806 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
807 if (r
->in
.system_name
) {
808 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
810 NDR_CHECK(ndr_push_winreg_AccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
812 if (flags
& NDR_OUT
) {
813 if (r
->out
.handle
== NULL
) {
814 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
816 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
817 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
819 return NDR_ERR_SUCCESS
;
822 static enum ndr_err_code
ndr_pull_winreg_OpenHKPD(struct ndr_pull
*ndr
, int flags
, struct winreg_OpenHKPD
*r
)
824 uint32_t _ptr_system_name
;
825 TALLOC_CTX
*_mem_save_system_name_0
;
826 TALLOC_CTX
*_mem_save_handle_0
;
827 if (flags
& NDR_IN
) {
830 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
831 if (_ptr_system_name
) {
832 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
834 r
->in
.system_name
= NULL
;
836 if (r
->in
.system_name
) {
837 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
838 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
839 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
840 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
842 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
843 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
844 ZERO_STRUCTP(r
->out
.handle
);
846 if (flags
& NDR_OUT
) {
847 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
848 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
850 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
851 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
852 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
853 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
854 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
856 return NDR_ERR_SUCCESS
;
859 _PUBLIC_
void ndr_print_winreg_OpenHKPD(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_OpenHKPD
*r
)
861 ndr_print_struct(ndr
, name
, "winreg_OpenHKPD");
863 if (flags
& NDR_SET_VALUES
) {
864 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
866 if (flags
& NDR_IN
) {
867 ndr_print_struct(ndr
, "in", "winreg_OpenHKPD");
869 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
871 if (r
->in
.system_name
) {
872 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
875 ndr_print_winreg_AccessMask(ndr
, "access_mask", r
->in
.access_mask
);
878 if (flags
& NDR_OUT
) {
879 ndr_print_struct(ndr
, "out", "winreg_OpenHKPD");
881 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
883 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
885 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
891 static enum ndr_err_code
ndr_push_winreg_OpenHKU(struct ndr_push
*ndr
, int flags
, const struct winreg_OpenHKU
*r
)
893 if (flags
& NDR_IN
) {
894 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
895 if (r
->in
.system_name
) {
896 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
898 NDR_CHECK(ndr_push_winreg_AccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
900 if (flags
& NDR_OUT
) {
901 if (r
->out
.handle
== NULL
) {
902 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
904 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
905 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
907 return NDR_ERR_SUCCESS
;
910 static enum ndr_err_code
ndr_pull_winreg_OpenHKU(struct ndr_pull
*ndr
, int flags
, struct winreg_OpenHKU
*r
)
912 uint32_t _ptr_system_name
;
913 TALLOC_CTX
*_mem_save_system_name_0
;
914 TALLOC_CTX
*_mem_save_handle_0
;
915 if (flags
& NDR_IN
) {
918 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
919 if (_ptr_system_name
) {
920 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
922 r
->in
.system_name
= NULL
;
924 if (r
->in
.system_name
) {
925 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
926 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
927 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
928 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
930 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
931 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
932 ZERO_STRUCTP(r
->out
.handle
);
934 if (flags
& NDR_OUT
) {
935 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
936 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
938 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
939 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
940 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
941 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
942 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
944 return NDR_ERR_SUCCESS
;
947 _PUBLIC_
void ndr_print_winreg_OpenHKU(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_OpenHKU
*r
)
949 ndr_print_struct(ndr
, name
, "winreg_OpenHKU");
951 if (flags
& NDR_SET_VALUES
) {
952 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
954 if (flags
& NDR_IN
) {
955 ndr_print_struct(ndr
, "in", "winreg_OpenHKU");
957 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
959 if (r
->in
.system_name
) {
960 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
963 ndr_print_winreg_AccessMask(ndr
, "access_mask", r
->in
.access_mask
);
966 if (flags
& NDR_OUT
) {
967 ndr_print_struct(ndr
, "out", "winreg_OpenHKU");
969 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
971 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
973 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
979 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_CloseKey(struct ndr_push
*ndr
, int flags
, const struct winreg_CloseKey
*r
)
981 if (flags
& NDR_IN
) {
982 if (r
->in
.handle
== NULL
) {
983 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
985 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
987 if (flags
& NDR_OUT
) {
988 if (r
->out
.handle
== NULL
) {
989 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
991 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
992 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
994 return NDR_ERR_SUCCESS
;
997 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_CloseKey(struct ndr_pull
*ndr
, int flags
, struct winreg_CloseKey
*r
)
999 TALLOC_CTX
*_mem_save_handle_0
;
1000 if (flags
& NDR_IN
) {
1001 ZERO_STRUCT(r
->out
);
1003 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1004 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1006 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1007 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1008 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1009 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1010 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1011 *r
->out
.handle
= *r
->in
.handle
;
1013 if (flags
& NDR_OUT
) {
1014 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1015 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1017 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1018 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1019 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
1020 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1021 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1023 return NDR_ERR_SUCCESS
;
1026 _PUBLIC_
void ndr_print_winreg_CloseKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_CloseKey
*r
)
1028 ndr_print_struct(ndr
, name
, "winreg_CloseKey");
1030 if (flags
& NDR_SET_VALUES
) {
1031 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1033 if (flags
& NDR_IN
) {
1034 ndr_print_struct(ndr
, "in", "winreg_CloseKey");
1036 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1038 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1042 if (flags
& NDR_OUT
) {
1043 ndr_print_struct(ndr
, "out", "winreg_CloseKey");
1045 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
1047 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
1049 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1055 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_CreateKey(struct ndr_push
*ndr
, int flags
, const struct winreg_CreateKey
*r
)
1057 if (flags
& NDR_IN
) {
1058 if (r
->in
.handle
== NULL
) {
1059 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1061 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1062 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
1063 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.keyclass
));
1064 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.options
));
1065 NDR_CHECK(ndr_push_winreg_AccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
1066 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.secdesc
));
1067 if (r
->in
.secdesc
) {
1068 NDR_CHECK(ndr_push_winreg_SecBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc
));
1070 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.action_taken
));
1071 if (r
->in
.action_taken
) {
1072 NDR_CHECK(ndr_push_winreg_CreateAction(ndr
, NDR_SCALARS
, *r
->in
.action_taken
));
1075 if (flags
& NDR_OUT
) {
1076 if (r
->out
.new_handle
== NULL
) {
1077 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1079 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.new_handle
));
1080 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.action_taken
));
1081 if (r
->out
.action_taken
) {
1082 NDR_CHECK(ndr_push_winreg_CreateAction(ndr
, NDR_SCALARS
, *r
->out
.action_taken
));
1084 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1086 return NDR_ERR_SUCCESS
;
1089 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_CreateKey(struct ndr_pull
*ndr
, int flags
, struct winreg_CreateKey
*r
)
1091 uint32_t _ptr_secdesc
;
1092 uint32_t _ptr_action_taken
;
1093 TALLOC_CTX
*_mem_save_handle_0
;
1094 TALLOC_CTX
*_mem_save_secdesc_0
;
1095 TALLOC_CTX
*_mem_save_new_handle_0
;
1096 TALLOC_CTX
*_mem_save_action_taken_0
;
1097 if (flags
& NDR_IN
) {
1098 ZERO_STRUCT(r
->out
);
1100 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1101 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1103 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1104 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1105 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1106 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1107 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
1108 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.keyclass
));
1109 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.options
));
1110 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
1111 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_secdesc
));
1113 NDR_PULL_ALLOC(ndr
, r
->in
.secdesc
);
1115 r
->in
.secdesc
= NULL
;
1117 if (r
->in
.secdesc
) {
1118 _mem_save_secdesc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1119 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.secdesc
, 0);
1120 NDR_CHECK(ndr_pull_winreg_SecBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc
));
1121 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_0
, 0);
1123 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_action_taken
));
1124 if (_ptr_action_taken
) {
1125 NDR_PULL_ALLOC(ndr
, r
->in
.action_taken
);
1127 r
->in
.action_taken
= NULL
;
1129 if (r
->in
.action_taken
) {
1130 _mem_save_action_taken_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1131 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.action_taken
, 0);
1132 NDR_CHECK(ndr_pull_winreg_CreateAction(ndr
, NDR_SCALARS
, r
->in
.action_taken
));
1133 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_action_taken_0
, 0);
1135 NDR_PULL_ALLOC(ndr
, r
->out
.new_handle
);
1136 ZERO_STRUCTP(r
->out
.new_handle
);
1138 if (flags
& NDR_OUT
) {
1139 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1140 NDR_PULL_ALLOC(ndr
, r
->out
.new_handle
);
1142 _mem_save_new_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1143 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.new_handle
, LIBNDR_FLAG_REF_ALLOC
);
1144 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.new_handle
));
1145 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1146 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_action_taken
));
1147 if (_ptr_action_taken
) {
1148 NDR_PULL_ALLOC(ndr
, r
->out
.action_taken
);
1150 r
->out
.action_taken
= NULL
;
1152 if (r
->out
.action_taken
) {
1153 _mem_save_action_taken_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1154 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.action_taken
, 0);
1155 NDR_CHECK(ndr_pull_winreg_CreateAction(ndr
, NDR_SCALARS
, r
->out
.action_taken
));
1156 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_action_taken_0
, 0);
1158 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1160 return NDR_ERR_SUCCESS
;
1163 _PUBLIC_
void ndr_print_winreg_CreateKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_CreateKey
*r
)
1165 ndr_print_struct(ndr
, name
, "winreg_CreateKey");
1167 if (flags
& NDR_SET_VALUES
) {
1168 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1170 if (flags
& NDR_IN
) {
1171 ndr_print_struct(ndr
, "in", "winreg_CreateKey");
1173 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1175 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1177 ndr_print_winreg_String(ndr
, "name", &r
->in
.name
);
1178 ndr_print_winreg_String(ndr
, "keyclass", &r
->in
.keyclass
);
1179 ndr_print_uint32(ndr
, "options", r
->in
.options
);
1180 ndr_print_winreg_AccessMask(ndr
, "access_mask", r
->in
.access_mask
);
1181 ndr_print_ptr(ndr
, "secdesc", r
->in
.secdesc
);
1183 if (r
->in
.secdesc
) {
1184 ndr_print_winreg_SecBuf(ndr
, "secdesc", r
->in
.secdesc
);
1187 ndr_print_ptr(ndr
, "action_taken", r
->in
.action_taken
);
1189 if (r
->in
.action_taken
) {
1190 ndr_print_winreg_CreateAction(ndr
, "action_taken", *r
->in
.action_taken
);
1195 if (flags
& NDR_OUT
) {
1196 ndr_print_struct(ndr
, "out", "winreg_CreateKey");
1198 ndr_print_ptr(ndr
, "new_handle", r
->out
.new_handle
);
1200 ndr_print_policy_handle(ndr
, "new_handle", r
->out
.new_handle
);
1202 ndr_print_ptr(ndr
, "action_taken", r
->out
.action_taken
);
1204 if (r
->out
.action_taken
) {
1205 ndr_print_winreg_CreateAction(ndr
, "action_taken", *r
->out
.action_taken
);
1208 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1214 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_DeleteKey(struct ndr_push
*ndr
, int flags
, const struct winreg_DeleteKey
*r
)
1216 if (flags
& NDR_IN
) {
1217 if (r
->in
.handle
== NULL
) {
1218 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1220 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1221 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.key
));
1223 if (flags
& NDR_OUT
) {
1224 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1226 return NDR_ERR_SUCCESS
;
1229 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_DeleteKey(struct ndr_pull
*ndr
, int flags
, struct winreg_DeleteKey
*r
)
1231 TALLOC_CTX
*_mem_save_handle_0
;
1232 if (flags
& NDR_IN
) {
1233 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1234 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1236 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1237 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1238 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1239 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1240 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.key
));
1242 if (flags
& NDR_OUT
) {
1243 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1245 return NDR_ERR_SUCCESS
;
1248 _PUBLIC_
void ndr_print_winreg_DeleteKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_DeleteKey
*r
)
1250 ndr_print_struct(ndr
, name
, "winreg_DeleteKey");
1252 if (flags
& NDR_SET_VALUES
) {
1253 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1255 if (flags
& NDR_IN
) {
1256 ndr_print_struct(ndr
, "in", "winreg_DeleteKey");
1258 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1260 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1262 ndr_print_winreg_String(ndr
, "key", &r
->in
.key
);
1265 if (flags
& NDR_OUT
) {
1266 ndr_print_struct(ndr
, "out", "winreg_DeleteKey");
1268 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1274 static enum ndr_err_code
ndr_push_winreg_DeleteValue(struct ndr_push
*ndr
, int flags
, const struct winreg_DeleteValue
*r
)
1276 if (flags
& NDR_IN
) {
1277 if (r
->in
.handle
== NULL
) {
1278 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1280 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1281 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.value
));
1283 if (flags
& NDR_OUT
) {
1284 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1286 return NDR_ERR_SUCCESS
;
1289 static enum ndr_err_code
ndr_pull_winreg_DeleteValue(struct ndr_pull
*ndr
, int flags
, struct winreg_DeleteValue
*r
)
1291 TALLOC_CTX
*_mem_save_handle_0
;
1292 if (flags
& NDR_IN
) {
1293 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1294 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1296 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1297 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1298 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1299 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1300 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.value
));
1302 if (flags
& NDR_OUT
) {
1303 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1305 return NDR_ERR_SUCCESS
;
1308 _PUBLIC_
void ndr_print_winreg_DeleteValue(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_DeleteValue
*r
)
1310 ndr_print_struct(ndr
, name
, "winreg_DeleteValue");
1312 if (flags
& NDR_SET_VALUES
) {
1313 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1315 if (flags
& NDR_IN
) {
1316 ndr_print_struct(ndr
, "in", "winreg_DeleteValue");
1318 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1320 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1322 ndr_print_winreg_String(ndr
, "value", &r
->in
.value
);
1325 if (flags
& NDR_OUT
) {
1326 ndr_print_struct(ndr
, "out", "winreg_DeleteValue");
1328 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1334 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_EnumKey(struct ndr_push
*ndr
, int flags
, const struct winreg_EnumKey
*r
)
1336 if (flags
& NDR_IN
) {
1337 if (r
->in
.handle
== NULL
) {
1338 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1340 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1341 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.enum_index
));
1342 if (r
->in
.name
== NULL
) {
1343 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1345 NDR_CHECK(ndr_push_winreg_StringBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
1346 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.keyclass
));
1347 if (r
->in
.keyclass
) {
1348 NDR_CHECK(ndr_push_winreg_StringBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.keyclass
));
1350 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.last_changed_time
));
1351 if (r
->in
.last_changed_time
) {
1352 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, *r
->in
.last_changed_time
));
1355 if (flags
& NDR_OUT
) {
1356 if (r
->out
.name
== NULL
) {
1357 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1359 NDR_CHECK(ndr_push_winreg_StringBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.name
));
1360 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.keyclass
));
1361 if (r
->out
.keyclass
) {
1362 NDR_CHECK(ndr_push_winreg_StringBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.keyclass
));
1364 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.last_changed_time
));
1365 if (r
->out
.last_changed_time
) {
1366 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, *r
->out
.last_changed_time
));
1368 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1370 return NDR_ERR_SUCCESS
;
1373 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_EnumKey(struct ndr_pull
*ndr
, int flags
, struct winreg_EnumKey
*r
)
1375 uint32_t _ptr_keyclass
;
1376 uint32_t _ptr_last_changed_time
;
1377 TALLOC_CTX
*_mem_save_handle_0
;
1378 TALLOC_CTX
*_mem_save_name_0
;
1379 TALLOC_CTX
*_mem_save_keyclass_0
;
1380 TALLOC_CTX
*_mem_save_last_changed_time_0
;
1381 if (flags
& NDR_IN
) {
1382 ZERO_STRUCT(r
->out
);
1384 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1385 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1387 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1388 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1389 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1390 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1391 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.enum_index
));
1392 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1393 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
1395 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1396 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
1397 NDR_CHECK(ndr_pull_winreg_StringBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
1398 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
1399 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_keyclass
));
1400 if (_ptr_keyclass
) {
1401 NDR_PULL_ALLOC(ndr
, r
->in
.keyclass
);
1403 r
->in
.keyclass
= NULL
;
1405 if (r
->in
.keyclass
) {
1406 _mem_save_keyclass_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1407 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.keyclass
, 0);
1408 NDR_CHECK(ndr_pull_winreg_StringBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.keyclass
));
1409 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_keyclass_0
, 0);
1411 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_last_changed_time
));
1412 if (_ptr_last_changed_time
) {
1413 NDR_PULL_ALLOC(ndr
, r
->in
.last_changed_time
);
1415 r
->in
.last_changed_time
= NULL
;
1417 if (r
->in
.last_changed_time
) {
1418 _mem_save_last_changed_time_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1419 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.last_changed_time
, 0);
1420 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, r
->in
.last_changed_time
));
1421 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_last_changed_time_0
, 0);
1423 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
1424 *r
->out
.name
= *r
->in
.name
;
1426 if (flags
& NDR_OUT
) {
1427 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1428 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
1430 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1431 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.name
, LIBNDR_FLAG_REF_ALLOC
);
1432 NDR_CHECK(ndr_pull_winreg_StringBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.name
));
1433 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
1434 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_keyclass
));
1435 if (_ptr_keyclass
) {
1436 NDR_PULL_ALLOC(ndr
, r
->out
.keyclass
);
1438 r
->out
.keyclass
= NULL
;
1440 if (r
->out
.keyclass
) {
1441 _mem_save_keyclass_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1442 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.keyclass
, 0);
1443 NDR_CHECK(ndr_pull_winreg_StringBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.keyclass
));
1444 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_keyclass_0
, 0);
1446 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_last_changed_time
));
1447 if (_ptr_last_changed_time
) {
1448 NDR_PULL_ALLOC(ndr
, r
->out
.last_changed_time
);
1450 r
->out
.last_changed_time
= NULL
;
1452 if (r
->out
.last_changed_time
) {
1453 _mem_save_last_changed_time_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1454 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.last_changed_time
, 0);
1455 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, r
->out
.last_changed_time
));
1456 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_last_changed_time_0
, 0);
1458 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1460 return NDR_ERR_SUCCESS
;
1463 _PUBLIC_
void ndr_print_winreg_EnumKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_EnumKey
*r
)
1465 ndr_print_struct(ndr
, name
, "winreg_EnumKey");
1467 if (flags
& NDR_SET_VALUES
) {
1468 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1470 if (flags
& NDR_IN
) {
1471 ndr_print_struct(ndr
, "in", "winreg_EnumKey");
1473 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1475 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1477 ndr_print_uint32(ndr
, "enum_index", r
->in
.enum_index
);
1478 ndr_print_ptr(ndr
, "name", r
->in
.name
);
1480 ndr_print_winreg_StringBuf(ndr
, "name", r
->in
.name
);
1482 ndr_print_ptr(ndr
, "keyclass", r
->in
.keyclass
);
1484 if (r
->in
.keyclass
) {
1485 ndr_print_winreg_StringBuf(ndr
, "keyclass", r
->in
.keyclass
);
1488 ndr_print_ptr(ndr
, "last_changed_time", r
->in
.last_changed_time
);
1490 if (r
->in
.last_changed_time
) {
1491 ndr_print_NTTIME(ndr
, "last_changed_time", *r
->in
.last_changed_time
);
1496 if (flags
& NDR_OUT
) {
1497 ndr_print_struct(ndr
, "out", "winreg_EnumKey");
1499 ndr_print_ptr(ndr
, "name", r
->out
.name
);
1501 ndr_print_winreg_StringBuf(ndr
, "name", r
->out
.name
);
1503 ndr_print_ptr(ndr
, "keyclass", r
->out
.keyclass
);
1505 if (r
->out
.keyclass
) {
1506 ndr_print_winreg_StringBuf(ndr
, "keyclass", r
->out
.keyclass
);
1509 ndr_print_ptr(ndr
, "last_changed_time", r
->out
.last_changed_time
);
1511 if (r
->out
.last_changed_time
) {
1512 ndr_print_NTTIME(ndr
, "last_changed_time", *r
->out
.last_changed_time
);
1515 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1521 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_EnumValue(struct ndr_push
*ndr
, int flags
, const struct winreg_EnumValue
*r
)
1523 if (flags
& NDR_IN
) {
1524 if (r
->in
.handle
== NULL
) {
1525 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1527 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1528 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.enum_index
));
1529 if (r
->in
.name
== NULL
) {
1530 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1532 NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
1533 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.type
));
1535 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, *r
->in
.type
));
1537 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.value
));
1539 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.size
));
1540 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1541 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.length
));
1542 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.value
, *r
->in
.length
));
1544 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.size
));
1546 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.size
));
1548 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.length
));
1550 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.length
));
1553 if (flags
& NDR_OUT
) {
1554 if (r
->out
.name
== NULL
) {
1555 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1557 NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.name
));
1558 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.type
));
1560 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, *r
->out
.type
));
1562 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.value
));
1564 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.size
));
1565 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
1566 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.length
));
1567 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.value
, *r
->out
.length
));
1569 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.size
));
1571 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.size
));
1573 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.length
));
1574 if (r
->out
.length
) {
1575 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.length
));
1577 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1579 return NDR_ERR_SUCCESS
;
1582 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_EnumValue(struct ndr_pull
*ndr
, int flags
, struct winreg_EnumValue
*r
)
1585 uint32_t _ptr_value
;
1587 uint32_t _ptr_length
;
1588 TALLOC_CTX
*_mem_save_handle_0
;
1589 TALLOC_CTX
*_mem_save_name_0
;
1590 TALLOC_CTX
*_mem_save_type_0
;
1591 TALLOC_CTX
*_mem_save_value_0
;
1592 TALLOC_CTX
*_mem_save_size_0
;
1593 TALLOC_CTX
*_mem_save_length_0
;
1594 if (flags
& NDR_IN
) {
1595 ZERO_STRUCT(r
->out
);
1597 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1598 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1600 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1601 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1602 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1603 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1604 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.enum_index
));
1605 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1606 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
1608 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1609 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
1610 NDR_CHECK(ndr_pull_winreg_ValNameBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
1611 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
1612 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_type
));
1614 NDR_PULL_ALLOC(ndr
, r
->in
.type
);
1619 _mem_save_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1620 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.type
, 0);
1621 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, r
->in
.type
));
1622 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_type_0
, 0);
1624 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_value
));
1626 NDR_PULL_ALLOC(ndr
, r
->in
.value
);
1631 _mem_save_value_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1632 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.value
, 0);
1633 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value
));
1634 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value
));
1635 if (ndr_get_array_length(ndr
, &r
->in
.value
) > ndr_get_array_size(ndr
, &r
->in
.value
)) {
1636 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
));
1638 NDR_PULL_ALLOC_N(ndr
, r
->in
.value
, ndr_get_array_size(ndr
, &r
->in
.value
));
1639 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.value
, ndr_get_array_length(ndr
, &r
->in
.value
)));
1640 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_value_0
, 0);
1642 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_size
));
1644 NDR_PULL_ALLOC(ndr
, r
->in
.size
);
1649 _mem_save_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1650 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.size
, 0);
1651 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.size
));
1652 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_size_0
, 0);
1654 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_length
));
1656 NDR_PULL_ALLOC(ndr
, r
->in
.length
);
1658 r
->in
.length
= NULL
;
1661 _mem_save_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1662 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.length
, 0);
1663 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.length
));
1664 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_length_0
, 0);
1666 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
1667 *r
->out
.name
= *r
->in
.name
;
1669 if (r
->in
.size
== NULL
) return ndr_pull_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL Pointer for size_is()");
1670 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.value
, *r
->in
.size
));
1673 if (r
->in
.length
== NULL
) return ndr_pull_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL Pointer for length_is()");
1674 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->in
.value
, *r
->in
.length
));
1677 if (flags
& NDR_OUT
) {
1678 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1679 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
1681 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1682 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.name
, LIBNDR_FLAG_REF_ALLOC
);
1683 NDR_CHECK(ndr_pull_winreg_ValNameBuf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.name
));
1684 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
1685 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_type
));
1687 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
1692 _mem_save_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1693 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.type
, 0);
1694 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, r
->out
.type
));
1695 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_type_0
, 0);
1697 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_value
));
1699 NDR_PULL_ALLOC(ndr
, r
->out
.value
);
1701 r
->out
.value
= NULL
;
1704 _mem_save_value_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1705 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.value
, 0);
1706 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.value
));
1707 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->out
.value
));
1708 if (ndr_get_array_length(ndr
, &r
->out
.value
) > ndr_get_array_size(ndr
, &r
->out
.value
)) {
1709 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
));
1711 NDR_PULL_ALLOC_N(ndr
, r
->out
.value
, ndr_get_array_size(ndr
, &r
->out
.value
));
1712 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.value
, ndr_get_array_length(ndr
, &r
->out
.value
)));
1713 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_value_0
, 0);
1715 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_size
));
1717 NDR_PULL_ALLOC(ndr
, r
->out
.size
);
1722 _mem_save_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1723 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.size
, 0);
1724 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.size
));
1725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_size_0
, 0);
1727 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_length
));
1729 NDR_PULL_ALLOC(ndr
, r
->out
.length
);
1731 r
->out
.length
= NULL
;
1733 if (r
->out
.length
) {
1734 _mem_save_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1735 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.length
, 0);
1736 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.length
));
1737 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_length_0
, 0);
1739 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1741 if (r
->out
.size
== NULL
) return ndr_pull_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL Pointer for size_is()");
1742 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.value
, *r
->out
.size
));
1745 if (r
->out
.length
== NULL
) return ndr_pull_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL Pointer for length_is()");
1746 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->out
.value
, *r
->out
.length
));
1749 return NDR_ERR_SUCCESS
;
1752 _PUBLIC_
void ndr_print_winreg_EnumValue(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_EnumValue
*r
)
1754 ndr_print_struct(ndr
, name
, "winreg_EnumValue");
1756 if (flags
& NDR_SET_VALUES
) {
1757 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1759 if (flags
& NDR_IN
) {
1760 ndr_print_struct(ndr
, "in", "winreg_EnumValue");
1762 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1764 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1766 ndr_print_uint32(ndr
, "enum_index", r
->in
.enum_index
);
1767 ndr_print_ptr(ndr
, "name", r
->in
.name
);
1769 ndr_print_winreg_ValNameBuf(ndr
, "name", r
->in
.name
);
1771 ndr_print_ptr(ndr
, "type", r
->in
.type
);
1774 ndr_print_winreg_Type(ndr
, "type", *r
->in
.type
);
1777 ndr_print_ptr(ndr
, "value", r
->in
.value
);
1780 if (r
->in
.length
== NULL
) return;
1781 ndr_print_array_uint8(ndr
, "value", r
->in
.value
, *r
->in
.length
);
1784 ndr_print_ptr(ndr
, "size", r
->in
.size
);
1787 ndr_print_uint32(ndr
, "size", *r
->in
.size
);
1790 ndr_print_ptr(ndr
, "length", r
->in
.length
);
1793 ndr_print_uint32(ndr
, "length", *r
->in
.length
);
1798 if (flags
& NDR_OUT
) {
1799 ndr_print_struct(ndr
, "out", "winreg_EnumValue");
1801 ndr_print_ptr(ndr
, "name", r
->out
.name
);
1803 ndr_print_winreg_ValNameBuf(ndr
, "name", r
->out
.name
);
1805 ndr_print_ptr(ndr
, "type", r
->out
.type
);
1808 ndr_print_winreg_Type(ndr
, "type", *r
->out
.type
);
1811 ndr_print_ptr(ndr
, "value", r
->out
.value
);
1814 if (r
->out
.length
== NULL
) return;
1815 ndr_print_array_uint8(ndr
, "value", r
->out
.value
, *r
->out
.length
);
1818 ndr_print_ptr(ndr
, "size", r
->out
.size
);
1821 ndr_print_uint32(ndr
, "size", *r
->out
.size
);
1824 ndr_print_ptr(ndr
, "length", r
->out
.length
);
1826 if (r
->out
.length
) {
1827 ndr_print_uint32(ndr
, "length", *r
->out
.length
);
1830 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1836 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_FlushKey(struct ndr_push
*ndr
, int flags
, const struct winreg_FlushKey
*r
)
1838 if (flags
& NDR_IN
) {
1839 if (r
->in
.handle
== NULL
) {
1840 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1842 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1844 if (flags
& NDR_OUT
) {
1845 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1847 return NDR_ERR_SUCCESS
;
1850 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_FlushKey(struct ndr_pull
*ndr
, int flags
, struct winreg_FlushKey
*r
)
1852 TALLOC_CTX
*_mem_save_handle_0
;
1853 if (flags
& NDR_IN
) {
1854 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1855 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1857 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1858 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1859 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1860 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1862 if (flags
& NDR_OUT
) {
1863 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1865 return NDR_ERR_SUCCESS
;
1868 _PUBLIC_
void ndr_print_winreg_FlushKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_FlushKey
*r
)
1870 ndr_print_struct(ndr
, name
, "winreg_FlushKey");
1872 if (flags
& NDR_SET_VALUES
) {
1873 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1875 if (flags
& NDR_IN
) {
1876 ndr_print_struct(ndr
, "in", "winreg_FlushKey");
1878 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1880 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1884 if (flags
& NDR_OUT
) {
1885 ndr_print_struct(ndr
, "out", "winreg_FlushKey");
1887 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1893 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_GetKeySecurity(struct ndr_push
*ndr
, int flags
, const struct winreg_GetKeySecurity
*r
)
1895 if (flags
& NDR_IN
) {
1896 if (r
->in
.handle
== NULL
) {
1897 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1899 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1900 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
1901 if (r
->in
.sd
== NULL
) {
1902 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1904 NDR_CHECK(ndr_push_KeySecurityData(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sd
));
1906 if (flags
& NDR_OUT
) {
1907 if (r
->out
.sd
== NULL
) {
1908 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1910 NDR_CHECK(ndr_push_KeySecurityData(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sd
));
1911 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1913 return NDR_ERR_SUCCESS
;
1916 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_GetKeySecurity(struct ndr_pull
*ndr
, int flags
, struct winreg_GetKeySecurity
*r
)
1918 TALLOC_CTX
*_mem_save_handle_0
;
1919 TALLOC_CTX
*_mem_save_sd_0
;
1920 if (flags
& NDR_IN
) {
1921 ZERO_STRUCT(r
->out
);
1923 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1924 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1926 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1927 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1928 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1929 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1930 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
1931 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1932 NDR_PULL_ALLOC(ndr
, r
->in
.sd
);
1934 _mem_save_sd_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1935 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sd
, LIBNDR_FLAG_REF_ALLOC
);
1936 NDR_CHECK(ndr_pull_KeySecurityData(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sd
));
1937 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sd_0
, LIBNDR_FLAG_REF_ALLOC
);
1938 NDR_PULL_ALLOC(ndr
, r
->out
.sd
);
1939 *r
->out
.sd
= *r
->in
.sd
;
1941 if (flags
& NDR_OUT
) {
1942 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1943 NDR_PULL_ALLOC(ndr
, r
->out
.sd
);
1945 _mem_save_sd_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1946 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sd
, LIBNDR_FLAG_REF_ALLOC
);
1947 NDR_CHECK(ndr_pull_KeySecurityData(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sd
));
1948 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sd_0
, LIBNDR_FLAG_REF_ALLOC
);
1949 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1951 return NDR_ERR_SUCCESS
;
1954 _PUBLIC_
void ndr_print_winreg_GetKeySecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_GetKeySecurity
*r
)
1956 ndr_print_struct(ndr
, name
, "winreg_GetKeySecurity");
1958 if (flags
& NDR_SET_VALUES
) {
1959 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1961 if (flags
& NDR_IN
) {
1962 ndr_print_struct(ndr
, "in", "winreg_GetKeySecurity");
1964 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1966 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1968 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
1969 ndr_print_ptr(ndr
, "sd", r
->in
.sd
);
1971 ndr_print_KeySecurityData(ndr
, "sd", r
->in
.sd
);
1975 if (flags
& NDR_OUT
) {
1976 ndr_print_struct(ndr
, "out", "winreg_GetKeySecurity");
1978 ndr_print_ptr(ndr
, "sd", r
->out
.sd
);
1980 ndr_print_KeySecurityData(ndr
, "sd", r
->out
.sd
);
1982 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1988 static enum ndr_err_code
ndr_push_winreg_LoadKey(struct ndr_push
*ndr
, int flags
, const struct winreg_LoadKey
*r
)
1990 if (flags
& NDR_IN
) {
1991 if (r
->in
.handle
== NULL
) {
1992 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1994 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1995 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.keyname
));
1996 if (r
->in
.keyname
) {
1997 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.keyname
));
1999 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.filename
));
2000 if (r
->in
.filename
) {
2001 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.filename
));
2004 if (flags
& NDR_OUT
) {
2005 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2007 return NDR_ERR_SUCCESS
;
2010 static enum ndr_err_code
ndr_pull_winreg_LoadKey(struct ndr_pull
*ndr
, int flags
, struct winreg_LoadKey
*r
)
2012 uint32_t _ptr_keyname
;
2013 uint32_t _ptr_filename
;
2014 TALLOC_CTX
*_mem_save_handle_0
;
2015 TALLOC_CTX
*_mem_save_keyname_0
;
2016 TALLOC_CTX
*_mem_save_filename_0
;
2017 if (flags
& NDR_IN
) {
2018 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2019 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2021 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2022 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2023 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2024 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2025 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_keyname
));
2027 NDR_PULL_ALLOC(ndr
, r
->in
.keyname
);
2029 r
->in
.keyname
= NULL
;
2031 if (r
->in
.keyname
) {
2032 _mem_save_keyname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2033 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.keyname
, 0);
2034 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.keyname
));
2035 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_keyname_0
, 0);
2037 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_filename
));
2038 if (_ptr_filename
) {
2039 NDR_PULL_ALLOC(ndr
, r
->in
.filename
);
2041 r
->in
.filename
= NULL
;
2043 if (r
->in
.filename
) {
2044 _mem_save_filename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2045 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.filename
, 0);
2046 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.filename
));
2047 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_filename_0
, 0);
2050 if (flags
& NDR_OUT
) {
2051 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2053 return NDR_ERR_SUCCESS
;
2056 _PUBLIC_
void ndr_print_winreg_LoadKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_LoadKey
*r
)
2058 ndr_print_struct(ndr
, name
, "winreg_LoadKey");
2060 if (flags
& NDR_SET_VALUES
) {
2061 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2063 if (flags
& NDR_IN
) {
2064 ndr_print_struct(ndr
, "in", "winreg_LoadKey");
2066 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2068 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2070 ndr_print_ptr(ndr
, "keyname", r
->in
.keyname
);
2072 if (r
->in
.keyname
) {
2073 ndr_print_winreg_String(ndr
, "keyname", r
->in
.keyname
);
2076 ndr_print_ptr(ndr
, "filename", r
->in
.filename
);
2078 if (r
->in
.filename
) {
2079 ndr_print_winreg_String(ndr
, "filename", r
->in
.filename
);
2084 if (flags
& NDR_OUT
) {
2085 ndr_print_struct(ndr
, "out", "winreg_LoadKey");
2087 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2093 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push
*ndr
, int flags
, const struct winreg_NotifyChangeKeyValue
*r
)
2095 if (flags
& NDR_IN
) {
2096 if (r
->in
.handle
== NULL
) {
2097 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2099 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2100 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.watch_subtree
));
2101 NDR_CHECK(ndr_push_winreg_NotifyChangeType(ndr
, NDR_SCALARS
, r
->in
.notify_filter
));
2102 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown
));
2103 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.string1
));
2104 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.string2
));
2105 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown2
));
2107 if (flags
& NDR_OUT
) {
2108 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2110 return NDR_ERR_SUCCESS
;
2113 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull
*ndr
, int flags
, struct winreg_NotifyChangeKeyValue
*r
)
2115 TALLOC_CTX
*_mem_save_handle_0
;
2116 if (flags
& NDR_IN
) {
2117 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2118 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2120 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2121 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2122 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2123 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2124 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.watch_subtree
));
2125 NDR_CHECK(ndr_pull_winreg_NotifyChangeType(ndr
, NDR_SCALARS
, &r
->in
.notify_filter
));
2126 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
2127 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.string1
));
2128 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.string2
));
2129 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown2
));
2131 if (flags
& NDR_OUT
) {
2132 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2134 return NDR_ERR_SUCCESS
;
2137 _PUBLIC_
void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_NotifyChangeKeyValue
*r
)
2139 ndr_print_struct(ndr
, name
, "winreg_NotifyChangeKeyValue");
2141 if (flags
& NDR_SET_VALUES
) {
2142 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2144 if (flags
& NDR_IN
) {
2145 ndr_print_struct(ndr
, "in", "winreg_NotifyChangeKeyValue");
2147 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2149 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2151 ndr_print_uint8(ndr
, "watch_subtree", r
->in
.watch_subtree
);
2152 ndr_print_winreg_NotifyChangeType(ndr
, "notify_filter", r
->in
.notify_filter
);
2153 ndr_print_uint32(ndr
, "unknown", r
->in
.unknown
);
2154 ndr_print_winreg_String(ndr
, "string1", &r
->in
.string1
);
2155 ndr_print_winreg_String(ndr
, "string2", &r
->in
.string2
);
2156 ndr_print_uint32(ndr
, "unknown2", r
->in
.unknown2
);
2159 if (flags
& NDR_OUT
) {
2160 ndr_print_struct(ndr
, "out", "winreg_NotifyChangeKeyValue");
2162 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2168 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_OpenKey(struct ndr_push
*ndr
, int flags
, const struct winreg_OpenKey
*r
)
2170 if (flags
& NDR_IN
) {
2171 if (r
->in
.parent_handle
== NULL
) {
2172 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2174 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.parent_handle
));
2175 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.keyname
));
2176 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown
));
2177 NDR_CHECK(ndr_push_winreg_AccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
2179 if (flags
& NDR_OUT
) {
2180 if (r
->out
.handle
== NULL
) {
2181 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2183 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
2184 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2186 return NDR_ERR_SUCCESS
;
2189 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_OpenKey(struct ndr_pull
*ndr
, int flags
, struct winreg_OpenKey
*r
)
2191 TALLOC_CTX
*_mem_save_parent_handle_0
;
2192 TALLOC_CTX
*_mem_save_handle_0
;
2193 if (flags
& NDR_IN
) {
2194 ZERO_STRUCT(r
->out
);
2196 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2197 NDR_PULL_ALLOC(ndr
, r
->in
.parent_handle
);
2199 _mem_save_parent_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2200 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.parent_handle
, LIBNDR_FLAG_REF_ALLOC
);
2201 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.parent_handle
));
2202 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parent_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2203 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.keyname
));
2204 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
2205 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
2206 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
2207 ZERO_STRUCTP(r
->out
.handle
);
2209 if (flags
& NDR_OUT
) {
2210 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2211 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
2213 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2214 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2215 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
2216 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2217 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2219 return NDR_ERR_SUCCESS
;
2222 _PUBLIC_
void ndr_print_winreg_OpenKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_OpenKey
*r
)
2224 ndr_print_struct(ndr
, name
, "winreg_OpenKey");
2226 if (flags
& NDR_SET_VALUES
) {
2227 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2229 if (flags
& NDR_IN
) {
2230 ndr_print_struct(ndr
, "in", "winreg_OpenKey");
2232 ndr_print_ptr(ndr
, "parent_handle", r
->in
.parent_handle
);
2234 ndr_print_policy_handle(ndr
, "parent_handle", r
->in
.parent_handle
);
2236 ndr_print_winreg_String(ndr
, "keyname", &r
->in
.keyname
);
2237 ndr_print_uint32(ndr
, "unknown", r
->in
.unknown
);
2238 ndr_print_winreg_AccessMask(ndr
, "access_mask", r
->in
.access_mask
);
2241 if (flags
& NDR_OUT
) {
2242 ndr_print_struct(ndr
, "out", "winreg_OpenKey");
2244 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
2246 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
2248 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2254 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_QueryInfoKey(struct ndr_push
*ndr
, int flags
, const struct winreg_QueryInfoKey
*r
)
2256 if (flags
& NDR_IN
) {
2257 if (r
->in
.handle
== NULL
) {
2258 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2260 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2261 if (r
->in
.classname
== NULL
) {
2262 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2264 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.classname
));
2266 if (flags
& NDR_OUT
) {
2267 if (r
->out
.classname
== NULL
) {
2268 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2270 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.classname
));
2271 if (r
->out
.num_subkeys
== 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
.num_subkeys
));
2275 if (r
->out
.max_subkeylen
== NULL
) {
2276 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2278 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.max_subkeylen
));
2279 if (r
->out
.max_classlen
== NULL
) {
2280 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.max_classlen
));
2283 if (r
->out
.num_values
== NULL
) {
2284 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2286 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_values
));
2287 if (r
->out
.max_valnamelen
== NULL
) {
2288 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.max_valnamelen
));
2291 if (r
->out
.max_valbufsize
== NULL
) {
2292 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2294 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.max_valbufsize
));
2295 if (r
->out
.secdescsize
== NULL
) {
2296 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2298 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.secdescsize
));
2299 if (r
->out
.last_changed_time
== NULL
) {
2300 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2302 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, *r
->out
.last_changed_time
));
2303 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2305 return NDR_ERR_SUCCESS
;
2308 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_QueryInfoKey(struct ndr_pull
*ndr
, int flags
, struct winreg_QueryInfoKey
*r
)
2310 TALLOC_CTX
*_mem_save_handle_0
;
2311 TALLOC_CTX
*_mem_save_classname_0
;
2312 TALLOC_CTX
*_mem_save_num_subkeys_0
;
2313 TALLOC_CTX
*_mem_save_max_subkeylen_0
;
2314 TALLOC_CTX
*_mem_save_max_classlen_0
;
2315 TALLOC_CTX
*_mem_save_num_values_0
;
2316 TALLOC_CTX
*_mem_save_max_valnamelen_0
;
2317 TALLOC_CTX
*_mem_save_max_valbufsize_0
;
2318 TALLOC_CTX
*_mem_save_secdescsize_0
;
2319 TALLOC_CTX
*_mem_save_last_changed_time_0
;
2320 if (flags
& NDR_IN
) {
2321 ZERO_STRUCT(r
->out
);
2323 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2324 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2326 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2327 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2328 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2329 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2330 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2331 NDR_PULL_ALLOC(ndr
, r
->in
.classname
);
2333 _mem_save_classname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2334 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.classname
, LIBNDR_FLAG_REF_ALLOC
);
2335 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.classname
));
2336 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_classname_0
, LIBNDR_FLAG_REF_ALLOC
);
2337 NDR_PULL_ALLOC(ndr
, r
->out
.classname
);
2338 *r
->out
.classname
= *r
->in
.classname
;
2339 NDR_PULL_ALLOC(ndr
, r
->out
.num_subkeys
);
2340 ZERO_STRUCTP(r
->out
.num_subkeys
);
2341 NDR_PULL_ALLOC(ndr
, r
->out
.max_subkeylen
);
2342 ZERO_STRUCTP(r
->out
.max_subkeylen
);
2343 NDR_PULL_ALLOC(ndr
, r
->out
.max_classlen
);
2344 ZERO_STRUCTP(r
->out
.max_classlen
);
2345 NDR_PULL_ALLOC(ndr
, r
->out
.num_values
);
2346 ZERO_STRUCTP(r
->out
.num_values
);
2347 NDR_PULL_ALLOC(ndr
, r
->out
.max_valnamelen
);
2348 ZERO_STRUCTP(r
->out
.max_valnamelen
);
2349 NDR_PULL_ALLOC(ndr
, r
->out
.max_valbufsize
);
2350 ZERO_STRUCTP(r
->out
.max_valbufsize
);
2351 NDR_PULL_ALLOC(ndr
, r
->out
.secdescsize
);
2352 ZERO_STRUCTP(r
->out
.secdescsize
);
2353 NDR_PULL_ALLOC(ndr
, r
->out
.last_changed_time
);
2354 ZERO_STRUCTP(r
->out
.last_changed_time
);
2356 if (flags
& NDR_OUT
) {
2357 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2358 NDR_PULL_ALLOC(ndr
, r
->out
.classname
);
2360 _mem_save_classname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2361 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.classname
, LIBNDR_FLAG_REF_ALLOC
);
2362 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.classname
));
2363 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_classname_0
, LIBNDR_FLAG_REF_ALLOC
);
2364 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2365 NDR_PULL_ALLOC(ndr
, r
->out
.num_subkeys
);
2367 _mem_save_num_subkeys_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2368 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_subkeys
, LIBNDR_FLAG_REF_ALLOC
);
2369 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_subkeys
));
2370 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_subkeys_0
, LIBNDR_FLAG_REF_ALLOC
);
2371 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2372 NDR_PULL_ALLOC(ndr
, r
->out
.max_subkeylen
);
2374 _mem_save_max_subkeylen_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2375 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.max_subkeylen
, LIBNDR_FLAG_REF_ALLOC
);
2376 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.max_subkeylen
));
2377 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_max_subkeylen_0
, LIBNDR_FLAG_REF_ALLOC
);
2378 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2379 NDR_PULL_ALLOC(ndr
, r
->out
.max_classlen
);
2381 _mem_save_max_classlen_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2382 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.max_classlen
, LIBNDR_FLAG_REF_ALLOC
);
2383 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.max_classlen
));
2384 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_max_classlen_0
, LIBNDR_FLAG_REF_ALLOC
);
2385 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2386 NDR_PULL_ALLOC(ndr
, r
->out
.num_values
);
2388 _mem_save_num_values_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2389 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_values
, LIBNDR_FLAG_REF_ALLOC
);
2390 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_values
));
2391 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_values_0
, LIBNDR_FLAG_REF_ALLOC
);
2392 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2393 NDR_PULL_ALLOC(ndr
, r
->out
.max_valnamelen
);
2395 _mem_save_max_valnamelen_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2396 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.max_valnamelen
, LIBNDR_FLAG_REF_ALLOC
);
2397 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.max_valnamelen
));
2398 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_max_valnamelen_0
, LIBNDR_FLAG_REF_ALLOC
);
2399 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2400 NDR_PULL_ALLOC(ndr
, r
->out
.max_valbufsize
);
2402 _mem_save_max_valbufsize_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2403 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.max_valbufsize
, LIBNDR_FLAG_REF_ALLOC
);
2404 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.max_valbufsize
));
2405 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_max_valbufsize_0
, LIBNDR_FLAG_REF_ALLOC
);
2406 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2407 NDR_PULL_ALLOC(ndr
, r
->out
.secdescsize
);
2409 _mem_save_secdescsize_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2410 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.secdescsize
, LIBNDR_FLAG_REF_ALLOC
);
2411 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.secdescsize
));
2412 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdescsize_0
, LIBNDR_FLAG_REF_ALLOC
);
2413 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2414 NDR_PULL_ALLOC(ndr
, r
->out
.last_changed_time
);
2416 _mem_save_last_changed_time_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2417 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.last_changed_time
, LIBNDR_FLAG_REF_ALLOC
);
2418 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, r
->out
.last_changed_time
));
2419 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_last_changed_time_0
, LIBNDR_FLAG_REF_ALLOC
);
2420 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2422 return NDR_ERR_SUCCESS
;
2425 _PUBLIC_
void ndr_print_winreg_QueryInfoKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_QueryInfoKey
*r
)
2427 ndr_print_struct(ndr
, name
, "winreg_QueryInfoKey");
2429 if (flags
& NDR_SET_VALUES
) {
2430 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2432 if (flags
& NDR_IN
) {
2433 ndr_print_struct(ndr
, "in", "winreg_QueryInfoKey");
2435 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2437 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2439 ndr_print_ptr(ndr
, "classname", r
->in
.classname
);
2441 ndr_print_winreg_String(ndr
, "classname", r
->in
.classname
);
2445 if (flags
& NDR_OUT
) {
2446 ndr_print_struct(ndr
, "out", "winreg_QueryInfoKey");
2448 ndr_print_ptr(ndr
, "classname", r
->out
.classname
);
2450 ndr_print_winreg_String(ndr
, "classname", r
->out
.classname
);
2452 ndr_print_ptr(ndr
, "num_subkeys", r
->out
.num_subkeys
);
2454 ndr_print_uint32(ndr
, "num_subkeys", *r
->out
.num_subkeys
);
2456 ndr_print_ptr(ndr
, "max_subkeylen", r
->out
.max_subkeylen
);
2458 ndr_print_uint32(ndr
, "max_subkeylen", *r
->out
.max_subkeylen
);
2460 ndr_print_ptr(ndr
, "max_classlen", r
->out
.max_classlen
);
2462 ndr_print_uint32(ndr
, "max_classlen", *r
->out
.max_classlen
);
2464 ndr_print_ptr(ndr
, "num_values", r
->out
.num_values
);
2466 ndr_print_uint32(ndr
, "num_values", *r
->out
.num_values
);
2468 ndr_print_ptr(ndr
, "max_valnamelen", r
->out
.max_valnamelen
);
2470 ndr_print_uint32(ndr
, "max_valnamelen", *r
->out
.max_valnamelen
);
2472 ndr_print_ptr(ndr
, "max_valbufsize", r
->out
.max_valbufsize
);
2474 ndr_print_uint32(ndr
, "max_valbufsize", *r
->out
.max_valbufsize
);
2476 ndr_print_ptr(ndr
, "secdescsize", r
->out
.secdescsize
);
2478 ndr_print_uint32(ndr
, "secdescsize", *r
->out
.secdescsize
);
2480 ndr_print_ptr(ndr
, "last_changed_time", r
->out
.last_changed_time
);
2482 ndr_print_NTTIME(ndr
, "last_changed_time", *r
->out
.last_changed_time
);
2484 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2490 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_QueryValue(struct ndr_push
*ndr
, int flags
, const struct winreg_QueryValue
*r
)
2492 if (flags
& NDR_IN
) {
2493 if (r
->in
.handle
== NULL
) {
2494 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2496 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2497 if (r
->in
.value_name
== NULL
) {
2498 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2500 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.value_name
));
2501 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.type
));
2503 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, *r
->in
.type
));
2505 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.data
));
2507 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.data_size
));
2508 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2509 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.data_length
));
2510 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, *r
->in
.data_length
));
2512 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.data_size
));
2513 if (r
->in
.data_size
) {
2514 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.data_size
));
2516 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.data_length
));
2517 if (r
->in
.data_length
) {
2518 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.data_length
));
2521 if (flags
& NDR_OUT
) {
2522 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.type
));
2524 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, *r
->out
.type
));
2526 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.data
));
2528 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.data_size
));
2529 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2530 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.data_length
));
2531 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, *r
->out
.data_length
));
2533 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.data_size
));
2534 if (r
->out
.data_size
) {
2535 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.data_size
));
2537 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.data_length
));
2538 if (r
->out
.data_length
) {
2539 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.data_length
));
2541 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2543 return NDR_ERR_SUCCESS
;
2546 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_QueryValue(struct ndr_pull
*ndr
, int flags
, struct winreg_QueryValue
*r
)
2550 uint32_t _ptr_data_size
;
2551 uint32_t _ptr_data_length
;
2552 TALLOC_CTX
*_mem_save_handle_0
;
2553 TALLOC_CTX
*_mem_save_value_name_0
;
2554 TALLOC_CTX
*_mem_save_type_0
;
2555 TALLOC_CTX
*_mem_save_data_0
;
2556 TALLOC_CTX
*_mem_save_data_size_0
;
2557 TALLOC_CTX
*_mem_save_data_length_0
;
2558 if (flags
& NDR_IN
) {
2559 ZERO_STRUCT(r
->out
);
2561 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2562 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2564 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2565 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2566 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2567 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2568 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2569 NDR_PULL_ALLOC(ndr
, r
->in
.value_name
);
2571 _mem_save_value_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2572 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.value_name
, LIBNDR_FLAG_REF_ALLOC
);
2573 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.value_name
));
2574 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_value_name_0
, LIBNDR_FLAG_REF_ALLOC
);
2575 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_type
));
2577 NDR_PULL_ALLOC(ndr
, r
->in
.type
);
2582 _mem_save_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2583 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.type
, 0);
2584 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, r
->in
.type
));
2585 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_type_0
, 0);
2587 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2589 NDR_PULL_ALLOC(ndr
, r
->in
.data
);
2594 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2595 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.data
, 0);
2596 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.data
));
2597 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.data
));
2598 if (ndr_get_array_length(ndr
, &r
->in
.data
) > ndr_get_array_size(ndr
, &r
->in
.data
)) {
2599 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
));
2601 NDR_PULL_ALLOC_N(ndr
, r
->in
.data
, ndr_get_array_size(ndr
, &r
->in
.data
));
2602 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, ndr_get_array_length(ndr
, &r
->in
.data
)));
2603 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2605 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_size
));
2606 if (_ptr_data_size
) {
2607 NDR_PULL_ALLOC(ndr
, r
->in
.data_size
);
2609 r
->in
.data_size
= NULL
;
2611 if (r
->in
.data_size
) {
2612 _mem_save_data_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2613 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.data_size
, 0);
2614 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.data_size
));
2615 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_size_0
, 0);
2617 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_length
));
2618 if (_ptr_data_length
) {
2619 NDR_PULL_ALLOC(ndr
, r
->in
.data_length
);
2621 r
->in
.data_length
= NULL
;
2623 if (r
->in
.data_length
) {
2624 _mem_save_data_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2625 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.data_length
, 0);
2626 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.data_length
));
2627 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_length_0
, 0);
2630 if (r
->in
.data_size
== NULL
) return ndr_pull_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL Pointer for size_is()");
2631 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.data
, *r
->in
.data_size
));
2634 if (r
->in
.data_length
== NULL
) return ndr_pull_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL Pointer for length_is()");
2635 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->in
.data
, *r
->in
.data_length
));
2638 if (flags
& NDR_OUT
) {
2639 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_type
));
2641 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
2646 _mem_save_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2647 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.type
, 0);
2648 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, r
->out
.type
));
2649 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_type_0
, 0);
2651 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2653 NDR_PULL_ALLOC(ndr
, r
->out
.data
);
2658 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2659 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.data
, 0);
2660 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.data
));
2661 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->out
.data
));
2662 if (ndr_get_array_length(ndr
, &r
->out
.data
) > ndr_get_array_size(ndr
, &r
->out
.data
)) {
2663 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->out
.data
), ndr_get_array_length(ndr
, &r
->out
.data
));
2665 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
));
2666 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, ndr_get_array_length(ndr
, &r
->out
.data
)));
2667 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2669 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_size
));
2670 if (_ptr_data_size
) {
2671 NDR_PULL_ALLOC(ndr
, r
->out
.data_size
);
2673 r
->out
.data_size
= NULL
;
2675 if (r
->out
.data_size
) {
2676 _mem_save_data_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2677 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.data_size
, 0);
2678 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.data_size
));
2679 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_size_0
, 0);
2681 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_length
));
2682 if (_ptr_data_length
) {
2683 NDR_PULL_ALLOC(ndr
, r
->out
.data_length
);
2685 r
->out
.data_length
= NULL
;
2687 if (r
->out
.data_length
) {
2688 _mem_save_data_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2689 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.data_length
, 0);
2690 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.data_length
));
2691 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_length_0
, 0);
2693 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2695 if (r
->out
.data_size
== NULL
) return ndr_pull_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL Pointer for size_is()");
2696 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.data
, *r
->out
.data_size
));
2699 if (r
->out
.data_length
== NULL
) return ndr_pull_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL Pointer for length_is()");
2700 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->out
.data
, *r
->out
.data_length
));
2703 return NDR_ERR_SUCCESS
;
2706 _PUBLIC_
void ndr_print_winreg_QueryValue(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_QueryValue
*r
)
2708 ndr_print_struct(ndr
, name
, "winreg_QueryValue");
2710 if (flags
& NDR_SET_VALUES
) {
2711 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2713 if (flags
& NDR_IN
) {
2714 ndr_print_struct(ndr
, "in", "winreg_QueryValue");
2716 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2718 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2720 ndr_print_ptr(ndr
, "value_name", r
->in
.value_name
);
2722 ndr_print_winreg_String(ndr
, "value_name", r
->in
.value_name
);
2724 ndr_print_ptr(ndr
, "type", r
->in
.type
);
2727 ndr_print_winreg_Type(ndr
, "type", *r
->in
.type
);
2730 ndr_print_ptr(ndr
, "data", r
->in
.data
);
2733 if (r
->in
.data_length
== NULL
) return;
2734 ndr_print_array_uint8(ndr
, "data", r
->in
.data
, *r
->in
.data_length
);
2737 ndr_print_ptr(ndr
, "data_size", r
->in
.data_size
);
2739 if (r
->in
.data_size
) {
2740 ndr_print_uint32(ndr
, "data_size", *r
->in
.data_size
);
2743 ndr_print_ptr(ndr
, "data_length", r
->in
.data_length
);
2745 if (r
->in
.data_length
) {
2746 ndr_print_uint32(ndr
, "data_length", *r
->in
.data_length
);
2751 if (flags
& NDR_OUT
) {
2752 ndr_print_struct(ndr
, "out", "winreg_QueryValue");
2754 ndr_print_ptr(ndr
, "type", r
->out
.type
);
2757 ndr_print_winreg_Type(ndr
, "type", *r
->out
.type
);
2760 ndr_print_ptr(ndr
, "data", r
->out
.data
);
2763 if (r
->out
.data_length
== NULL
) return;
2764 ndr_print_array_uint8(ndr
, "data", r
->out
.data
, *r
->out
.data_length
);
2767 ndr_print_ptr(ndr
, "data_size", r
->out
.data_size
);
2769 if (r
->out
.data_size
) {
2770 ndr_print_uint32(ndr
, "data_size", *r
->out
.data_size
);
2773 ndr_print_ptr(ndr
, "data_length", r
->out
.data_length
);
2775 if (r
->out
.data_length
) {
2776 ndr_print_uint32(ndr
, "data_length", *r
->out
.data_length
);
2779 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2785 static enum ndr_err_code
ndr_push_winreg_ReplaceKey(struct ndr_push
*ndr
, int flags
, const struct winreg_ReplaceKey
*r
)
2787 if (flags
& NDR_IN
) {
2789 if (flags
& NDR_OUT
) {
2790 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2792 return NDR_ERR_SUCCESS
;
2795 static enum ndr_err_code
ndr_pull_winreg_ReplaceKey(struct ndr_pull
*ndr
, int flags
, struct winreg_ReplaceKey
*r
)
2797 if (flags
& NDR_IN
) {
2799 if (flags
& NDR_OUT
) {
2800 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2802 return NDR_ERR_SUCCESS
;
2805 _PUBLIC_
void ndr_print_winreg_ReplaceKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_ReplaceKey
*r
)
2807 ndr_print_struct(ndr
, name
, "winreg_ReplaceKey");
2809 if (flags
& NDR_SET_VALUES
) {
2810 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2812 if (flags
& NDR_IN
) {
2813 ndr_print_struct(ndr
, "in", "winreg_ReplaceKey");
2817 if (flags
& NDR_OUT
) {
2818 ndr_print_struct(ndr
, "out", "winreg_ReplaceKey");
2820 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2826 static enum ndr_err_code
ndr_push_winreg_RestoreKey(struct ndr_push
*ndr
, int flags
, const struct winreg_RestoreKey
*r
)
2828 if (flags
& NDR_IN
) {
2829 if (r
->in
.handle
== NULL
) {
2830 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2832 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2833 if (r
->in
.filename
== NULL
) {
2834 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2836 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.filename
));
2837 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.flags
));
2839 if (flags
& NDR_OUT
) {
2840 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2842 return NDR_ERR_SUCCESS
;
2845 static enum ndr_err_code
ndr_pull_winreg_RestoreKey(struct ndr_pull
*ndr
, int flags
, struct winreg_RestoreKey
*r
)
2847 TALLOC_CTX
*_mem_save_handle_0
;
2848 TALLOC_CTX
*_mem_save_filename_0
;
2849 if (flags
& NDR_IN
) {
2850 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2851 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2853 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2854 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2855 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2856 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2857 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2858 NDR_PULL_ALLOC(ndr
, r
->in
.filename
);
2860 _mem_save_filename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2861 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.filename
, LIBNDR_FLAG_REF_ALLOC
);
2862 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.filename
));
2863 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_filename_0
, LIBNDR_FLAG_REF_ALLOC
);
2864 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.flags
));
2866 if (flags
& NDR_OUT
) {
2867 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2869 return NDR_ERR_SUCCESS
;
2872 _PUBLIC_
void ndr_print_winreg_RestoreKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_RestoreKey
*r
)
2874 ndr_print_struct(ndr
, name
, "winreg_RestoreKey");
2876 if (flags
& NDR_SET_VALUES
) {
2877 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2879 if (flags
& NDR_IN
) {
2880 ndr_print_struct(ndr
, "in", "winreg_RestoreKey");
2882 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2884 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2886 ndr_print_ptr(ndr
, "filename", r
->in
.filename
);
2888 ndr_print_winreg_String(ndr
, "filename", r
->in
.filename
);
2890 ndr_print_uint32(ndr
, "flags", r
->in
.flags
);
2893 if (flags
& NDR_OUT
) {
2894 ndr_print_struct(ndr
, "out", "winreg_RestoreKey");
2896 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2902 static enum ndr_err_code
ndr_push_winreg_SaveKey(struct ndr_push
*ndr
, int flags
, const struct winreg_SaveKey
*r
)
2904 if (flags
& NDR_IN
) {
2905 if (r
->in
.handle
== NULL
) {
2906 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2908 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2909 if (r
->in
.filename
== NULL
) {
2910 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2912 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.filename
));
2913 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.sec_attrib
));
2914 if (r
->in
.sec_attrib
) {
2915 NDR_CHECK(ndr_push_KeySecurityAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sec_attrib
));
2918 if (flags
& NDR_OUT
) {
2919 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2921 return NDR_ERR_SUCCESS
;
2924 static enum ndr_err_code
ndr_pull_winreg_SaveKey(struct ndr_pull
*ndr
, int flags
, struct winreg_SaveKey
*r
)
2926 uint32_t _ptr_sec_attrib
;
2927 TALLOC_CTX
*_mem_save_handle_0
;
2928 TALLOC_CTX
*_mem_save_filename_0
;
2929 TALLOC_CTX
*_mem_save_sec_attrib_0
;
2930 if (flags
& NDR_IN
) {
2931 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2932 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2934 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2935 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2936 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2937 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2938 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2939 NDR_PULL_ALLOC(ndr
, r
->in
.filename
);
2941 _mem_save_filename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2942 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.filename
, LIBNDR_FLAG_REF_ALLOC
);
2943 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.filename
));
2944 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_filename_0
, LIBNDR_FLAG_REF_ALLOC
);
2945 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sec_attrib
));
2946 if (_ptr_sec_attrib
) {
2947 NDR_PULL_ALLOC(ndr
, r
->in
.sec_attrib
);
2949 r
->in
.sec_attrib
= NULL
;
2951 if (r
->in
.sec_attrib
) {
2952 _mem_save_sec_attrib_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2953 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sec_attrib
, 0);
2954 NDR_CHECK(ndr_pull_KeySecurityAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sec_attrib
));
2955 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_attrib_0
, 0);
2958 if (flags
& NDR_OUT
) {
2959 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2961 return NDR_ERR_SUCCESS
;
2964 _PUBLIC_
void ndr_print_winreg_SaveKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_SaveKey
*r
)
2966 ndr_print_struct(ndr
, name
, "winreg_SaveKey");
2968 if (flags
& NDR_SET_VALUES
) {
2969 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2971 if (flags
& NDR_IN
) {
2972 ndr_print_struct(ndr
, "in", "winreg_SaveKey");
2974 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2976 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2978 ndr_print_ptr(ndr
, "filename", r
->in
.filename
);
2980 ndr_print_winreg_String(ndr
, "filename", r
->in
.filename
);
2982 ndr_print_ptr(ndr
, "sec_attrib", r
->in
.sec_attrib
);
2984 if (r
->in
.sec_attrib
) {
2985 ndr_print_KeySecurityAttribute(ndr
, "sec_attrib", r
->in
.sec_attrib
);
2990 if (flags
& NDR_OUT
) {
2991 ndr_print_struct(ndr
, "out", "winreg_SaveKey");
2993 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2999 static enum ndr_err_code
ndr_push_winreg_SetKeySecurity(struct ndr_push
*ndr
, int flags
, const struct winreg_SetKeySecurity
*r
)
3001 if (flags
& NDR_IN
) {
3002 if (r
->in
.handle
== NULL
) {
3003 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3005 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3006 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
3007 if (r
->in
.sd
== NULL
) {
3008 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3010 NDR_CHECK(ndr_push_KeySecurityData(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sd
));
3012 if (flags
& NDR_OUT
) {
3013 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3015 return NDR_ERR_SUCCESS
;
3018 static enum ndr_err_code
ndr_pull_winreg_SetKeySecurity(struct ndr_pull
*ndr
, int flags
, struct winreg_SetKeySecurity
*r
)
3020 TALLOC_CTX
*_mem_save_handle_0
;
3021 TALLOC_CTX
*_mem_save_sd_0
;
3022 if (flags
& NDR_IN
) {
3023 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3024 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
3026 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3027 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3028 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3029 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3030 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
3031 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3032 NDR_PULL_ALLOC(ndr
, r
->in
.sd
);
3034 _mem_save_sd_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3035 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sd
, LIBNDR_FLAG_REF_ALLOC
);
3036 NDR_CHECK(ndr_pull_KeySecurityData(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sd
));
3037 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sd_0
, LIBNDR_FLAG_REF_ALLOC
);
3039 if (flags
& NDR_OUT
) {
3040 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3042 return NDR_ERR_SUCCESS
;
3045 _PUBLIC_
void ndr_print_winreg_SetKeySecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_SetKeySecurity
*r
)
3047 ndr_print_struct(ndr
, name
, "winreg_SetKeySecurity");
3049 if (flags
& NDR_SET_VALUES
) {
3050 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3052 if (flags
& NDR_IN
) {
3053 ndr_print_struct(ndr
, "in", "winreg_SetKeySecurity");
3055 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
3057 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
3059 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
3060 ndr_print_ptr(ndr
, "sd", r
->in
.sd
);
3062 ndr_print_KeySecurityData(ndr
, "sd", r
->in
.sd
);
3066 if (flags
& NDR_OUT
) {
3067 ndr_print_struct(ndr
, "out", "winreg_SetKeySecurity");
3069 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3075 static enum ndr_err_code
ndr_push_winreg_SetValue(struct ndr_push
*ndr
, int flags
, const struct winreg_SetValue
*r
)
3077 if (flags
& NDR_IN
) {
3078 if (r
->in
.handle
== NULL
) {
3079 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3081 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3082 NDR_CHECK(ndr_push_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
3083 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->in
.type
));
3084 if (r
->in
.data
== NULL
) {
3085 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3087 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.size
));
3088 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, r
->in
.size
));
3089 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.size
));
3091 if (flags
& NDR_OUT
) {
3092 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3094 return NDR_ERR_SUCCESS
;
3097 static enum ndr_err_code
ndr_pull_winreg_SetValue(struct ndr_pull
*ndr
, int flags
, struct winreg_SetValue
*r
)
3099 TALLOC_CTX
*_mem_save_handle_0
;
3100 if (flags
& NDR_IN
) {
3101 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3102 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
3104 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3105 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3106 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3107 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3108 NDR_CHECK(ndr_pull_winreg_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
3109 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, &r
->in
.type
));
3110 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.data
));
3111 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3112 NDR_PULL_ALLOC_N(ndr
, r
->in
.data
, ndr_get_array_size(ndr
, &r
->in
.data
));
3114 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, ndr_get_array_size(ndr
, &r
->in
.data
)));
3115 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.size
));
3117 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.data
, r
->in
.size
));
3120 if (flags
& NDR_OUT
) {
3121 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3123 return NDR_ERR_SUCCESS
;
3126 _PUBLIC_
void ndr_print_winreg_SetValue(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_SetValue
*r
)
3128 ndr_print_struct(ndr
, name
, "winreg_SetValue");
3130 if (flags
& NDR_SET_VALUES
) {
3131 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3133 if (flags
& NDR_IN
) {
3134 ndr_print_struct(ndr
, "in", "winreg_SetValue");
3136 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
3138 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
3140 ndr_print_winreg_String(ndr
, "name", &r
->in
.name
);
3141 ndr_print_winreg_Type(ndr
, "type", r
->in
.type
);
3142 ndr_print_ptr(ndr
, "data", r
->in
.data
);
3144 ndr_print_array_uint8(ndr
, "data", r
->in
.data
, r
->in
.size
);
3146 ndr_print_uint32(ndr
, "size", r
->in
.size
);
3149 if (flags
& NDR_OUT
) {
3150 ndr_print_struct(ndr
, "out", "winreg_SetValue");
3152 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3158 static enum ndr_err_code
ndr_push_winreg_UnLoadKey(struct ndr_push
*ndr
, int flags
, const struct winreg_UnLoadKey
*r
)
3160 if (flags
& NDR_IN
) {
3162 if (flags
& NDR_OUT
) {
3163 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3165 return NDR_ERR_SUCCESS
;
3168 static enum ndr_err_code
ndr_pull_winreg_UnLoadKey(struct ndr_pull
*ndr
, int flags
, struct winreg_UnLoadKey
*r
)
3170 if (flags
& NDR_IN
) {
3172 if (flags
& NDR_OUT
) {
3173 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3175 return NDR_ERR_SUCCESS
;
3178 _PUBLIC_
void ndr_print_winreg_UnLoadKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_UnLoadKey
*r
)
3180 ndr_print_struct(ndr
, name
, "winreg_UnLoadKey");
3182 if (flags
& NDR_SET_VALUES
) {
3183 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3185 if (flags
& NDR_IN
) {
3186 ndr_print_struct(ndr
, "in", "winreg_UnLoadKey");
3190 if (flags
& NDR_OUT
) {
3191 ndr_print_struct(ndr
, "out", "winreg_UnLoadKey");
3193 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3199 static enum ndr_err_code
ndr_push_winreg_InitiateSystemShutdown(struct ndr_push
*ndr
, int flags
, const struct winreg_InitiateSystemShutdown
*r
)
3201 if (flags
& NDR_IN
) {
3202 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.hostname
));
3203 if (r
->in
.hostname
) {
3204 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.hostname
));
3206 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.message
));
3207 if (r
->in
.message
) {
3208 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.message
));
3210 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.timeout
));
3211 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.force_apps
));
3212 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.do_reboot
));
3214 if (flags
& NDR_OUT
) {
3215 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3217 return NDR_ERR_SUCCESS
;
3220 static enum ndr_err_code
ndr_pull_winreg_InitiateSystemShutdown(struct ndr_pull
*ndr
, int flags
, struct winreg_InitiateSystemShutdown
*r
)
3222 uint32_t _ptr_hostname
;
3223 uint32_t _ptr_message
;
3224 TALLOC_CTX
*_mem_save_hostname_0
;
3225 TALLOC_CTX
*_mem_save_message_0
;
3226 if (flags
& NDR_IN
) {
3227 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hostname
));
3228 if (_ptr_hostname
) {
3229 NDR_PULL_ALLOC(ndr
, r
->in
.hostname
);
3231 r
->in
.hostname
= NULL
;
3233 if (r
->in
.hostname
) {
3234 _mem_save_hostname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3235 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.hostname
, 0);
3236 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.hostname
));
3237 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hostname_0
, 0);
3239 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_message
));
3241 NDR_PULL_ALLOC(ndr
, r
->in
.message
);
3243 r
->in
.message
= NULL
;
3245 if (r
->in
.message
) {
3246 _mem_save_message_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3247 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.message
, 0);
3248 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.message
));
3249 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_message_0
, 0);
3251 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.timeout
));
3252 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.force_apps
));
3253 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.do_reboot
));
3255 if (flags
& NDR_OUT
) {
3256 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3258 return NDR_ERR_SUCCESS
;
3261 _PUBLIC_
void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_InitiateSystemShutdown
*r
)
3263 ndr_print_struct(ndr
, name
, "winreg_InitiateSystemShutdown");
3265 if (flags
& NDR_SET_VALUES
) {
3266 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3268 if (flags
& NDR_IN
) {
3269 ndr_print_struct(ndr
, "in", "winreg_InitiateSystemShutdown");
3271 ndr_print_ptr(ndr
, "hostname", r
->in
.hostname
);
3273 if (r
->in
.hostname
) {
3274 ndr_print_uint16(ndr
, "hostname", *r
->in
.hostname
);
3277 ndr_print_ptr(ndr
, "message", r
->in
.message
);
3279 if (r
->in
.message
) {
3280 ndr_print_lsa_StringLarge(ndr
, "message", r
->in
.message
);
3283 ndr_print_uint32(ndr
, "timeout", r
->in
.timeout
);
3284 ndr_print_uint8(ndr
, "force_apps", r
->in
.force_apps
);
3285 ndr_print_uint8(ndr
, "do_reboot", r
->in
.do_reboot
);
3288 if (flags
& NDR_OUT
) {
3289 ndr_print_struct(ndr
, "out", "winreg_InitiateSystemShutdown");
3291 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3297 static enum ndr_err_code
ndr_push_winreg_AbortSystemShutdown(struct ndr_push
*ndr
, int flags
, const struct winreg_AbortSystemShutdown
*r
)
3299 if (flags
& NDR_IN
) {
3300 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
3302 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.server
));
3305 if (flags
& NDR_OUT
) {
3306 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3308 return NDR_ERR_SUCCESS
;
3311 static enum ndr_err_code
ndr_pull_winreg_AbortSystemShutdown(struct ndr_pull
*ndr
, int flags
, struct winreg_AbortSystemShutdown
*r
)
3313 uint32_t _ptr_server
;
3314 TALLOC_CTX
*_mem_save_server_0
;
3315 if (flags
& NDR_IN
) {
3316 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
3318 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
3320 r
->in
.server
= NULL
;
3323 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3324 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
3325 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.server
));
3326 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
3329 if (flags
& NDR_OUT
) {
3330 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3332 return NDR_ERR_SUCCESS
;
3335 _PUBLIC_
void ndr_print_winreg_AbortSystemShutdown(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_AbortSystemShutdown
*r
)
3337 ndr_print_struct(ndr
, name
, "winreg_AbortSystemShutdown");
3339 if (flags
& NDR_SET_VALUES
) {
3340 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3342 if (flags
& NDR_IN
) {
3343 ndr_print_struct(ndr
, "in", "winreg_AbortSystemShutdown");
3345 ndr_print_ptr(ndr
, "server", r
->in
.server
);
3348 ndr_print_uint16(ndr
, "server", *r
->in
.server
);
3353 if (flags
& NDR_OUT
) {
3354 ndr_print_struct(ndr
, "out", "winreg_AbortSystemShutdown");
3356 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3362 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_GetVersion(struct ndr_push
*ndr
, int flags
, const struct winreg_GetVersion
*r
)
3364 if (flags
& NDR_IN
) {
3365 if (r
->in
.handle
== NULL
) {
3366 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3368 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3370 if (flags
& NDR_OUT
) {
3371 if (r
->out
.version
== NULL
) {
3372 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3374 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.version
));
3375 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3377 return NDR_ERR_SUCCESS
;
3380 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_GetVersion(struct ndr_pull
*ndr
, int flags
, struct winreg_GetVersion
*r
)
3382 TALLOC_CTX
*_mem_save_handle_0
;
3383 TALLOC_CTX
*_mem_save_version_0
;
3384 if (flags
& NDR_IN
) {
3385 ZERO_STRUCT(r
->out
);
3387 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3388 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
3390 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3391 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3392 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3393 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3394 NDR_PULL_ALLOC(ndr
, r
->out
.version
);
3395 ZERO_STRUCTP(r
->out
.version
);
3397 if (flags
& NDR_OUT
) {
3398 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3399 NDR_PULL_ALLOC(ndr
, r
->out
.version
);
3401 _mem_save_version_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3402 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.version
, LIBNDR_FLAG_REF_ALLOC
);
3403 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.version
));
3404 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_version_0
, LIBNDR_FLAG_REF_ALLOC
);
3405 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3407 return NDR_ERR_SUCCESS
;
3410 _PUBLIC_
void ndr_print_winreg_GetVersion(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_GetVersion
*r
)
3412 ndr_print_struct(ndr
, name
, "winreg_GetVersion");
3414 if (flags
& NDR_SET_VALUES
) {
3415 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3417 if (flags
& NDR_IN
) {
3418 ndr_print_struct(ndr
, "in", "winreg_GetVersion");
3420 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
3422 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
3426 if (flags
& NDR_OUT
) {
3427 ndr_print_struct(ndr
, "out", "winreg_GetVersion");
3429 ndr_print_ptr(ndr
, "version", r
->out
.version
);
3431 ndr_print_uint32(ndr
, "version", *r
->out
.version
);
3433 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3439 static enum ndr_err_code
ndr_push_winreg_OpenHKCC(struct ndr_push
*ndr
, int flags
, const struct winreg_OpenHKCC
*r
)
3441 if (flags
& NDR_IN
) {
3442 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
3443 if (r
->in
.system_name
) {
3444 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
3446 NDR_CHECK(ndr_push_winreg_AccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
3448 if (flags
& NDR_OUT
) {
3449 if (r
->out
.handle
== NULL
) {
3450 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3452 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
3453 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3455 return NDR_ERR_SUCCESS
;
3458 static enum ndr_err_code
ndr_pull_winreg_OpenHKCC(struct ndr_pull
*ndr
, int flags
, struct winreg_OpenHKCC
*r
)
3460 uint32_t _ptr_system_name
;
3461 TALLOC_CTX
*_mem_save_system_name_0
;
3462 TALLOC_CTX
*_mem_save_handle_0
;
3463 if (flags
& NDR_IN
) {
3464 ZERO_STRUCT(r
->out
);
3466 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
3467 if (_ptr_system_name
) {
3468 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
3470 r
->in
.system_name
= NULL
;
3472 if (r
->in
.system_name
) {
3473 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3474 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
3475 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
3476 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
3478 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
3479 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
3480 ZERO_STRUCTP(r
->out
.handle
);
3482 if (flags
& NDR_OUT
) {
3483 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3484 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
3486 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3487 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3488 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
3489 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3490 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3492 return NDR_ERR_SUCCESS
;
3495 _PUBLIC_
void ndr_print_winreg_OpenHKCC(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_OpenHKCC
*r
)
3497 ndr_print_struct(ndr
, name
, "winreg_OpenHKCC");
3499 if (flags
& NDR_SET_VALUES
) {
3500 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3502 if (flags
& NDR_IN
) {
3503 ndr_print_struct(ndr
, "in", "winreg_OpenHKCC");
3505 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
3507 if (r
->in
.system_name
) {
3508 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
3511 ndr_print_winreg_AccessMask(ndr
, "access_mask", r
->in
.access_mask
);
3514 if (flags
& NDR_OUT
) {
3515 ndr_print_struct(ndr
, "out", "winreg_OpenHKCC");
3517 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
3519 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
3521 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3527 static enum ndr_err_code
ndr_push_winreg_OpenHKDD(struct ndr_push
*ndr
, int flags
, const struct winreg_OpenHKDD
*r
)
3529 if (flags
& NDR_IN
) {
3530 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
3531 if (r
->in
.system_name
) {
3532 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
3534 NDR_CHECK(ndr_push_winreg_AccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
3536 if (flags
& NDR_OUT
) {
3537 if (r
->out
.handle
== NULL
) {
3538 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3540 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
3541 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3543 return NDR_ERR_SUCCESS
;
3546 static enum ndr_err_code
ndr_pull_winreg_OpenHKDD(struct ndr_pull
*ndr
, int flags
, struct winreg_OpenHKDD
*r
)
3548 uint32_t _ptr_system_name
;
3549 TALLOC_CTX
*_mem_save_system_name_0
;
3550 TALLOC_CTX
*_mem_save_handle_0
;
3551 if (flags
& NDR_IN
) {
3552 ZERO_STRUCT(r
->out
);
3554 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
3555 if (_ptr_system_name
) {
3556 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
3558 r
->in
.system_name
= NULL
;
3560 if (r
->in
.system_name
) {
3561 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3562 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
3563 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
3564 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
3566 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
3567 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
3568 ZERO_STRUCTP(r
->out
.handle
);
3570 if (flags
& NDR_OUT
) {
3571 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3572 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
3574 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3575 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3576 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
3577 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3578 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3580 return NDR_ERR_SUCCESS
;
3583 _PUBLIC_
void ndr_print_winreg_OpenHKDD(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_OpenHKDD
*r
)
3585 ndr_print_struct(ndr
, name
, "winreg_OpenHKDD");
3587 if (flags
& NDR_SET_VALUES
) {
3588 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3590 if (flags
& NDR_IN
) {
3591 ndr_print_struct(ndr
, "in", "winreg_OpenHKDD");
3593 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
3595 if (r
->in
.system_name
) {
3596 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
3599 ndr_print_winreg_AccessMask(ndr
, "access_mask", r
->in
.access_mask
);
3602 if (flags
& NDR_OUT
) {
3603 ndr_print_struct(ndr
, "out", "winreg_OpenHKDD");
3605 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
3607 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
3609 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3615 _PUBLIC_
enum ndr_err_code
ndr_push_winreg_QueryMultipleValues(struct ndr_push
*ndr
, int flags
, const struct winreg_QueryMultipleValues
*r
)
3617 uint32_t cntr_values_1
;
3618 if (flags
& NDR_IN
) {
3619 if (r
->in
.key_handle
== NULL
) {
3620 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3622 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.key_handle
));
3623 if (r
->in
.values
== NULL
) {
3624 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3626 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_values
));
3627 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3628 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_values
));
3629 for (cntr_values_1
= 0; cntr_values_1
< r
->in
.num_values
; cntr_values_1
++) {
3630 NDR_CHECK(ndr_push_QueryMultipleValue(ndr
, NDR_SCALARS
, &r
->in
.values
[cntr_values_1
]));
3632 for (cntr_values_1
= 0; cntr_values_1
< r
->in
.num_values
; cntr_values_1
++) {
3633 NDR_CHECK(ndr_push_QueryMultipleValue(ndr
, NDR_BUFFERS
, &r
->in
.values
[cntr_values_1
]));
3635 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_values
));
3636 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
3638 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.buffer_size
));
3639 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3640 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.buffer_size
));
3641 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, *r
->in
.buffer_size
));
3643 if (r
->in
.buffer_size
== NULL
) {
3644 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3646 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.buffer_size
));
3648 if (flags
& NDR_OUT
) {
3649 if (r
->out
.values
== NULL
) {
3650 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3652 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_values
));
3653 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3654 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_values
));
3655 for (cntr_values_1
= 0; cntr_values_1
< r
->in
.num_values
; cntr_values_1
++) {
3656 NDR_CHECK(ndr_push_QueryMultipleValue(ndr
, NDR_SCALARS
, &r
->out
.values
[cntr_values_1
]));
3658 for (cntr_values_1
= 0; cntr_values_1
< r
->in
.num_values
; cntr_values_1
++) {
3659 NDR_CHECK(ndr_push_QueryMultipleValue(ndr
, NDR_BUFFERS
, &r
->out
.values
[cntr_values_1
]));
3661 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.buffer
));
3662 if (r
->out
.buffer
) {
3663 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.buffer_size
));
3664 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
3665 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.buffer_size
));
3666 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, *r
->out
.buffer_size
));
3668 if (r
->out
.buffer_size
== NULL
) {
3669 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3671 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.buffer_size
));
3672 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3674 return NDR_ERR_SUCCESS
;
3677 _PUBLIC_
enum ndr_err_code
ndr_pull_winreg_QueryMultipleValues(struct ndr_pull
*ndr
, int flags
, struct winreg_QueryMultipleValues
*r
)
3679 uint32_t cntr_values_1
;
3680 uint32_t _ptr_buffer
;
3681 TALLOC_CTX
*_mem_save_key_handle_0
;
3682 TALLOC_CTX
*_mem_save_values_1
;
3683 TALLOC_CTX
*_mem_save_buffer_0
;
3684 TALLOC_CTX
*_mem_save_buffer_size_0
;
3685 if (flags
& NDR_IN
) {
3686 ZERO_STRUCT(r
->out
);
3688 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3689 NDR_PULL_ALLOC(ndr
, r
->in
.key_handle
);
3691 _mem_save_key_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3692 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.key_handle
, LIBNDR_FLAG_REF_ALLOC
);
3693 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.key_handle
));
3694 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_key_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3695 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.values
));
3696 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.values
));
3697 if (ndr_get_array_length(ndr
, &r
->in
.values
) > ndr_get_array_size(ndr
, &r
->in
.values
)) {
3698 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
));
3700 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3701 NDR_PULL_ALLOC_N(ndr
, r
->in
.values
, ndr_get_array_size(ndr
, &r
->in
.values
));
3703 memcpy(r
->out
.values
, r
->in
.values
, ndr_get_array_size(ndr
, &r
->in
.values
) * sizeof(*r
->in
.values
));
3704 _mem_save_values_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3705 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.values
, 0);
3706 for (cntr_values_1
= 0; cntr_values_1
< r
->in
.num_values
; cntr_values_1
++) {
3707 NDR_CHECK(ndr_pull_QueryMultipleValue(ndr
, NDR_SCALARS
, &r
->in
.values
[cntr_values_1
]));
3709 for (cntr_values_1
= 0; cntr_values_1
< r
->in
.num_values
; cntr_values_1
++) {
3710 NDR_CHECK(ndr_pull_QueryMultipleValue(ndr
, NDR_BUFFERS
, &r
->in
.values
[cntr_values_1
]));
3712 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_values_1
, 0);
3713 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_values
));
3714 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
3716 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
3718 r
->in
.buffer
= NULL
;
3721 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3722 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
3723 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.buffer
));
3724 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.buffer
));
3725 if (ndr_get_array_length(ndr
, &r
->in
.buffer
) > ndr_get_array_size(ndr
, &r
->in
.buffer
)) {
3726 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
));
3728 NDR_PULL_ALLOC_N(ndr
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
));
3729 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, ndr_get_array_length(ndr
, &r
->in
.buffer
)));
3730 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
3732 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3733 NDR_PULL_ALLOC(ndr
, r
->in
.buffer_size
);
3735 _mem_save_buffer_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3736 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer_size
, LIBNDR_FLAG_REF_ALLOC
);
3737 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.buffer_size
));
3738 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_size_0
, LIBNDR_FLAG_REF_ALLOC
);
3739 NDR_PULL_ALLOC_N(ndr
, r
->out
.values
, r
->in
.num_values
);
3740 memcpy(r
->out
.values
, r
->in
.values
, (r
->in
.num_values
) * sizeof(*r
->in
.values
));
3741 NDR_PULL_ALLOC(ndr
, r
->out
.buffer_size
);
3742 *r
->out
.buffer_size
= *r
->in
.buffer_size
;
3744 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.values
, r
->in
.num_values
));
3747 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->in
.values
, r
->in
.num_values
));
3750 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.buffer
, *r
->in
.buffer_size
));
3753 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->in
.buffer
, *r
->in
.buffer_size
));
3756 if (flags
& NDR_OUT
) {
3757 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.values
));
3758 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->out
.values
));
3759 if (ndr_get_array_length(ndr
, &r
->out
.values
) > ndr_get_array_size(ndr
, &r
->out
.values
)) {
3760 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
));
3762 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3763 NDR_PULL_ALLOC_N(ndr
, r
->out
.values
, ndr_get_array_size(ndr
, &r
->out
.values
));
3765 memcpy(r
->out
.values
, r
->in
.values
, ndr_get_array_size(ndr
, &r
->out
.values
) * sizeof(*r
->in
.values
));
3766 _mem_save_values_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3767 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.values
, 0);
3768 for (cntr_values_1
= 0; cntr_values_1
< r
->in
.num_values
; cntr_values_1
++) {
3769 NDR_CHECK(ndr_pull_QueryMultipleValue(ndr
, NDR_SCALARS
, &r
->out
.values
[cntr_values_1
]));
3771 for (cntr_values_1
= 0; cntr_values_1
< r
->in
.num_values
; cntr_values_1
++) {
3772 NDR_CHECK(ndr_pull_QueryMultipleValue(ndr
, NDR_BUFFERS
, &r
->out
.values
[cntr_values_1
]));
3774 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_values_1
, 0);
3775 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
3777 NDR_PULL_ALLOC(ndr
, r
->out
.buffer
);
3779 r
->out
.buffer
= NULL
;
3781 if (r
->out
.buffer
) {
3782 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3783 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.buffer
, 0);
3784 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.buffer
));
3785 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->out
.buffer
));
3786 if (ndr_get_array_length(ndr
, &r
->out
.buffer
) > ndr_get_array_size(ndr
, &r
->out
.buffer
)) {
3787 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
));
3789 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
));
3790 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, ndr_get_array_length(ndr
, &r
->out
.buffer
)));
3791 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
3793 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3794 NDR_PULL_ALLOC(ndr
, r
->out
.buffer_size
);
3796 _mem_save_buffer_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3797 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.buffer_size
, LIBNDR_FLAG_REF_ALLOC
);
3798 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.buffer_size
));
3799 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_size_0
, LIBNDR_FLAG_REF_ALLOC
);
3800 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3801 if (r
->out
.values
) {
3802 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.values
, r
->in
.num_values
));
3804 if (r
->out
.values
) {
3805 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->out
.values
, r
->in
.num_values
));
3807 if (r
->out
.buffer
) {
3808 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.buffer
, *r
->out
.buffer_size
));
3810 if (r
->out
.buffer
) {
3811 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->out
.buffer
, *r
->out
.buffer_size
));
3814 return NDR_ERR_SUCCESS
;
3817 _PUBLIC_
void ndr_print_winreg_QueryMultipleValues(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_QueryMultipleValues
*r
)
3819 uint32_t cntr_values_1
;
3820 ndr_print_struct(ndr
, name
, "winreg_QueryMultipleValues");
3822 if (flags
& NDR_SET_VALUES
) {
3823 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3825 if (flags
& NDR_IN
) {
3826 ndr_print_struct(ndr
, "in", "winreg_QueryMultipleValues");
3828 ndr_print_ptr(ndr
, "key_handle", r
->in
.key_handle
);
3830 ndr_print_policy_handle(ndr
, "key_handle", r
->in
.key_handle
);
3832 ndr_print_ptr(ndr
, "values", r
->in
.values
);
3834 ndr
->print(ndr
, "%s: ARRAY(%d)", "values", (int)r
->in
.num_values
);
3836 for (cntr_values_1
=0;cntr_values_1
<r
->in
.num_values
;cntr_values_1
++) {
3838 if (asprintf(&idx_1
, "[%d]", cntr_values_1
) != -1) {
3839 ndr_print_QueryMultipleValue(ndr
, "values", &r
->in
.values
[cntr_values_1
]);
3845 ndr_print_uint32(ndr
, "num_values", r
->in
.num_values
);
3846 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
3849 ndr_print_array_uint8(ndr
, "buffer", r
->in
.buffer
, *r
->in
.buffer_size
);
3852 ndr_print_ptr(ndr
, "buffer_size", r
->in
.buffer_size
);
3854 ndr_print_uint32(ndr
, "buffer_size", *r
->in
.buffer_size
);
3858 if (flags
& NDR_OUT
) {
3859 ndr_print_struct(ndr
, "out", "winreg_QueryMultipleValues");
3861 ndr_print_ptr(ndr
, "values", r
->out
.values
);
3863 ndr
->print(ndr
, "%s: ARRAY(%d)", "values", (int)r
->in
.num_values
);
3865 for (cntr_values_1
=0;cntr_values_1
<r
->in
.num_values
;cntr_values_1
++) {
3867 if (asprintf(&idx_1
, "[%d]", cntr_values_1
) != -1) {
3868 ndr_print_QueryMultipleValue(ndr
, "values", &r
->out
.values
[cntr_values_1
]);
3874 ndr_print_ptr(ndr
, "buffer", r
->out
.buffer
);
3876 if (r
->out
.buffer
) {
3877 ndr_print_array_uint8(ndr
, "buffer", r
->out
.buffer
, *r
->out
.buffer_size
);
3880 ndr_print_ptr(ndr
, "buffer_size", r
->out
.buffer_size
);
3882 ndr_print_uint32(ndr
, "buffer_size", *r
->out
.buffer_size
);
3884 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3890 static enum ndr_err_code
ndr_push_winreg_InitiateSystemShutdownEx(struct ndr_push
*ndr
, int flags
, const struct winreg_InitiateSystemShutdownEx
*r
)
3892 if (flags
& NDR_IN
) {
3893 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.hostname
));
3894 if (r
->in
.hostname
) {
3895 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.hostname
));
3897 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.message
));
3898 if (r
->in
.message
) {
3899 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.message
));
3901 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.timeout
));
3902 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.force_apps
));
3903 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.do_reboot
));
3904 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.reason
));
3906 if (flags
& NDR_OUT
) {
3907 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3909 return NDR_ERR_SUCCESS
;
3912 static enum ndr_err_code
ndr_pull_winreg_InitiateSystemShutdownEx(struct ndr_pull
*ndr
, int flags
, struct winreg_InitiateSystemShutdownEx
*r
)
3914 uint32_t _ptr_hostname
;
3915 uint32_t _ptr_message
;
3916 TALLOC_CTX
*_mem_save_hostname_0
;
3917 TALLOC_CTX
*_mem_save_message_0
;
3918 if (flags
& NDR_IN
) {
3919 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hostname
));
3920 if (_ptr_hostname
) {
3921 NDR_PULL_ALLOC(ndr
, r
->in
.hostname
);
3923 r
->in
.hostname
= NULL
;
3925 if (r
->in
.hostname
) {
3926 _mem_save_hostname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3927 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.hostname
, 0);
3928 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.hostname
));
3929 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hostname_0
, 0);
3931 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_message
));
3933 NDR_PULL_ALLOC(ndr
, r
->in
.message
);
3935 r
->in
.message
= NULL
;
3937 if (r
->in
.message
) {
3938 _mem_save_message_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3939 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.message
, 0);
3940 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.message
));
3941 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_message_0
, 0);
3943 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.timeout
));
3944 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.force_apps
));
3945 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.do_reboot
));
3946 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.reason
));
3948 if (flags
& NDR_OUT
) {
3949 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3951 return NDR_ERR_SUCCESS
;
3954 _PUBLIC_
void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_InitiateSystemShutdownEx
*r
)
3956 ndr_print_struct(ndr
, name
, "winreg_InitiateSystemShutdownEx");
3958 if (flags
& NDR_SET_VALUES
) {
3959 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3961 if (flags
& NDR_IN
) {
3962 ndr_print_struct(ndr
, "in", "winreg_InitiateSystemShutdownEx");
3964 ndr_print_ptr(ndr
, "hostname", r
->in
.hostname
);
3966 if (r
->in
.hostname
) {
3967 ndr_print_uint16(ndr
, "hostname", *r
->in
.hostname
);
3970 ndr_print_ptr(ndr
, "message", r
->in
.message
);
3972 if (r
->in
.message
) {
3973 ndr_print_lsa_StringLarge(ndr
, "message", r
->in
.message
);
3976 ndr_print_uint32(ndr
, "timeout", r
->in
.timeout
);
3977 ndr_print_uint8(ndr
, "force_apps", r
->in
.force_apps
);
3978 ndr_print_uint8(ndr
, "do_reboot", r
->in
.do_reboot
);
3979 ndr_print_uint32(ndr
, "reason", r
->in
.reason
);
3982 if (flags
& NDR_OUT
) {
3983 ndr_print_struct(ndr
, "out", "winreg_InitiateSystemShutdownEx");
3985 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3991 static enum ndr_err_code
ndr_push_winreg_SaveKeyEx(struct ndr_push
*ndr
, int flags
, const struct winreg_SaveKeyEx
*r
)
3993 if (flags
& NDR_IN
) {
3995 if (flags
& NDR_OUT
) {
3996 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3998 return NDR_ERR_SUCCESS
;
4001 static enum ndr_err_code
ndr_pull_winreg_SaveKeyEx(struct ndr_pull
*ndr
, int flags
, struct winreg_SaveKeyEx
*r
)
4003 if (flags
& NDR_IN
) {
4005 if (flags
& NDR_OUT
) {
4006 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4008 return NDR_ERR_SUCCESS
;
4011 _PUBLIC_
void ndr_print_winreg_SaveKeyEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_SaveKeyEx
*r
)
4013 ndr_print_struct(ndr
, name
, "winreg_SaveKeyEx");
4015 if (flags
& NDR_SET_VALUES
) {
4016 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4018 if (flags
& NDR_IN
) {
4019 ndr_print_struct(ndr
, "in", "winreg_SaveKeyEx");
4023 if (flags
& NDR_OUT
) {
4024 ndr_print_struct(ndr
, "out", "winreg_SaveKeyEx");
4026 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4032 static enum ndr_err_code
ndr_push_winreg_OpenHKPT(struct ndr_push
*ndr
, int flags
, const struct winreg_OpenHKPT
*r
)
4034 if (flags
& NDR_IN
) {
4035 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
4036 if (r
->in
.system_name
) {
4037 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
4039 NDR_CHECK(ndr_push_winreg_AccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
4041 if (flags
& NDR_OUT
) {
4042 if (r
->out
.handle
== NULL
) {
4043 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4045 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
4046 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4048 return NDR_ERR_SUCCESS
;
4051 static enum ndr_err_code
ndr_pull_winreg_OpenHKPT(struct ndr_pull
*ndr
, int flags
, struct winreg_OpenHKPT
*r
)
4053 uint32_t _ptr_system_name
;
4054 TALLOC_CTX
*_mem_save_system_name_0
;
4055 TALLOC_CTX
*_mem_save_handle_0
;
4056 if (flags
& NDR_IN
) {
4057 ZERO_STRUCT(r
->out
);
4059 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
4060 if (_ptr_system_name
) {
4061 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
4063 r
->in
.system_name
= NULL
;
4065 if (r
->in
.system_name
) {
4066 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4067 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
4068 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
4069 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
4071 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
4072 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
4073 ZERO_STRUCTP(r
->out
.handle
);
4075 if (flags
& NDR_OUT
) {
4076 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4077 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
4079 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4080 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
4081 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
4082 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
4083 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4085 return NDR_ERR_SUCCESS
;
4088 _PUBLIC_
void ndr_print_winreg_OpenHKPT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_OpenHKPT
*r
)
4090 ndr_print_struct(ndr
, name
, "winreg_OpenHKPT");
4092 if (flags
& NDR_SET_VALUES
) {
4093 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4095 if (flags
& NDR_IN
) {
4096 ndr_print_struct(ndr
, "in", "winreg_OpenHKPT");
4098 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
4100 if (r
->in
.system_name
) {
4101 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
4104 ndr_print_winreg_AccessMask(ndr
, "access_mask", r
->in
.access_mask
);
4107 if (flags
& NDR_OUT
) {
4108 ndr_print_struct(ndr
, "out", "winreg_OpenHKPT");
4110 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
4112 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
4114 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4120 static enum ndr_err_code
ndr_push_winreg_OpenHKPN(struct ndr_push
*ndr
, int flags
, const struct winreg_OpenHKPN
*r
)
4122 if (flags
& NDR_IN
) {
4123 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
4124 if (r
->in
.system_name
) {
4125 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
4127 NDR_CHECK(ndr_push_winreg_AccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
4129 if (flags
& NDR_OUT
) {
4130 if (r
->out
.handle
== NULL
) {
4131 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4133 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
4134 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4136 return NDR_ERR_SUCCESS
;
4139 static enum ndr_err_code
ndr_pull_winreg_OpenHKPN(struct ndr_pull
*ndr
, int flags
, struct winreg_OpenHKPN
*r
)
4141 uint32_t _ptr_system_name
;
4142 TALLOC_CTX
*_mem_save_system_name_0
;
4143 TALLOC_CTX
*_mem_save_handle_0
;
4144 if (flags
& NDR_IN
) {
4145 ZERO_STRUCT(r
->out
);
4147 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
4148 if (_ptr_system_name
) {
4149 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
4151 r
->in
.system_name
= NULL
;
4153 if (r
->in
.system_name
) {
4154 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4155 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
4156 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
4157 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
4159 NDR_CHECK(ndr_pull_winreg_AccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
4160 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
4161 ZERO_STRUCTP(r
->out
.handle
);
4163 if (flags
& NDR_OUT
) {
4164 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4165 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
4167 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4168 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
4169 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
4170 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
4171 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4173 return NDR_ERR_SUCCESS
;
4176 _PUBLIC_
void ndr_print_winreg_OpenHKPN(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_OpenHKPN
*r
)
4178 ndr_print_struct(ndr
, name
, "winreg_OpenHKPN");
4180 if (flags
& NDR_SET_VALUES
) {
4181 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4183 if (flags
& NDR_IN
) {
4184 ndr_print_struct(ndr
, "in", "winreg_OpenHKPN");
4186 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
4188 if (r
->in
.system_name
) {
4189 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
4192 ndr_print_winreg_AccessMask(ndr
, "access_mask", r
->in
.access_mask
);
4195 if (flags
& NDR_OUT
) {
4196 ndr_print_struct(ndr
, "out", "winreg_OpenHKPN");
4198 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
4200 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
4202 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4208 static enum ndr_err_code
ndr_push_winreg_QueryMultipleValues2(struct ndr_push
*ndr
, int flags
, const struct winreg_QueryMultipleValues2
*r
)
4210 if (flags
& NDR_IN
) {
4212 if (flags
& NDR_OUT
) {
4213 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4215 return NDR_ERR_SUCCESS
;
4218 static enum ndr_err_code
ndr_pull_winreg_QueryMultipleValues2(struct ndr_pull
*ndr
, int flags
, struct winreg_QueryMultipleValues2
*r
)
4220 if (flags
& NDR_IN
) {
4222 if (flags
& NDR_OUT
) {
4223 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4225 return NDR_ERR_SUCCESS
;
4228 _PUBLIC_
void ndr_print_winreg_QueryMultipleValues2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct winreg_QueryMultipleValues2
*r
)
4230 ndr_print_struct(ndr
, name
, "winreg_QueryMultipleValues2");
4232 if (flags
& NDR_SET_VALUES
) {
4233 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4235 if (flags
& NDR_IN
) {
4236 ndr_print_struct(ndr
, "in", "winreg_QueryMultipleValues2");
4240 if (flags
& NDR_OUT
) {
4241 ndr_print_struct(ndr
, "out", "winreg_QueryMultipleValues2");
4243 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4249 static const struct ndr_interface_call winreg_calls
[] = {
4252 sizeof(struct winreg_OpenHKCR
),
4253 (ndr_push_flags_fn_t
) ndr_push_winreg_OpenHKCR
,
4254 (ndr_pull_flags_fn_t
) ndr_pull_winreg_OpenHKCR
,
4255 (ndr_print_function_t
) ndr_print_winreg_OpenHKCR
,
4260 sizeof(struct winreg_OpenHKCU
),
4261 (ndr_push_flags_fn_t
) ndr_push_winreg_OpenHKCU
,
4262 (ndr_pull_flags_fn_t
) ndr_pull_winreg_OpenHKCU
,
4263 (ndr_print_function_t
) ndr_print_winreg_OpenHKCU
,
4268 sizeof(struct winreg_OpenHKLM
),
4269 (ndr_push_flags_fn_t
) ndr_push_winreg_OpenHKLM
,
4270 (ndr_pull_flags_fn_t
) ndr_pull_winreg_OpenHKLM
,
4271 (ndr_print_function_t
) ndr_print_winreg_OpenHKLM
,
4276 sizeof(struct winreg_OpenHKPD
),
4277 (ndr_push_flags_fn_t
) ndr_push_winreg_OpenHKPD
,
4278 (ndr_pull_flags_fn_t
) ndr_pull_winreg_OpenHKPD
,
4279 (ndr_print_function_t
) ndr_print_winreg_OpenHKPD
,
4284 sizeof(struct winreg_OpenHKU
),
4285 (ndr_push_flags_fn_t
) ndr_push_winreg_OpenHKU
,
4286 (ndr_pull_flags_fn_t
) ndr_pull_winreg_OpenHKU
,
4287 (ndr_print_function_t
) ndr_print_winreg_OpenHKU
,
4292 sizeof(struct winreg_CloseKey
),
4293 (ndr_push_flags_fn_t
) ndr_push_winreg_CloseKey
,
4294 (ndr_pull_flags_fn_t
) ndr_pull_winreg_CloseKey
,
4295 (ndr_print_function_t
) ndr_print_winreg_CloseKey
,
4300 sizeof(struct winreg_CreateKey
),
4301 (ndr_push_flags_fn_t
) ndr_push_winreg_CreateKey
,
4302 (ndr_pull_flags_fn_t
) ndr_pull_winreg_CreateKey
,
4303 (ndr_print_function_t
) ndr_print_winreg_CreateKey
,
4308 sizeof(struct winreg_DeleteKey
),
4309 (ndr_push_flags_fn_t
) ndr_push_winreg_DeleteKey
,
4310 (ndr_pull_flags_fn_t
) ndr_pull_winreg_DeleteKey
,
4311 (ndr_print_function_t
) ndr_print_winreg_DeleteKey
,
4315 "winreg_DeleteValue",
4316 sizeof(struct winreg_DeleteValue
),
4317 (ndr_push_flags_fn_t
) ndr_push_winreg_DeleteValue
,
4318 (ndr_pull_flags_fn_t
) ndr_pull_winreg_DeleteValue
,
4319 (ndr_print_function_t
) ndr_print_winreg_DeleteValue
,
4324 sizeof(struct winreg_EnumKey
),
4325 (ndr_push_flags_fn_t
) ndr_push_winreg_EnumKey
,
4326 (ndr_pull_flags_fn_t
) ndr_pull_winreg_EnumKey
,
4327 (ndr_print_function_t
) ndr_print_winreg_EnumKey
,
4332 sizeof(struct winreg_EnumValue
),
4333 (ndr_push_flags_fn_t
) ndr_push_winreg_EnumValue
,
4334 (ndr_pull_flags_fn_t
) ndr_pull_winreg_EnumValue
,
4335 (ndr_print_function_t
) ndr_print_winreg_EnumValue
,
4340 sizeof(struct winreg_FlushKey
),
4341 (ndr_push_flags_fn_t
) ndr_push_winreg_FlushKey
,
4342 (ndr_pull_flags_fn_t
) ndr_pull_winreg_FlushKey
,
4343 (ndr_print_function_t
) ndr_print_winreg_FlushKey
,
4347 "winreg_GetKeySecurity",
4348 sizeof(struct winreg_GetKeySecurity
),
4349 (ndr_push_flags_fn_t
) ndr_push_winreg_GetKeySecurity
,
4350 (ndr_pull_flags_fn_t
) ndr_pull_winreg_GetKeySecurity
,
4351 (ndr_print_function_t
) ndr_print_winreg_GetKeySecurity
,
4356 sizeof(struct winreg_LoadKey
),
4357 (ndr_push_flags_fn_t
) ndr_push_winreg_LoadKey
,
4358 (ndr_pull_flags_fn_t
) ndr_pull_winreg_LoadKey
,
4359 (ndr_print_function_t
) ndr_print_winreg_LoadKey
,
4363 "winreg_NotifyChangeKeyValue",
4364 sizeof(struct winreg_NotifyChangeKeyValue
),
4365 (ndr_push_flags_fn_t
) ndr_push_winreg_NotifyChangeKeyValue
,
4366 (ndr_pull_flags_fn_t
) ndr_pull_winreg_NotifyChangeKeyValue
,
4367 (ndr_print_function_t
) ndr_print_winreg_NotifyChangeKeyValue
,
4372 sizeof(struct winreg_OpenKey
),
4373 (ndr_push_flags_fn_t
) ndr_push_winreg_OpenKey
,
4374 (ndr_pull_flags_fn_t
) ndr_pull_winreg_OpenKey
,
4375 (ndr_print_function_t
) ndr_print_winreg_OpenKey
,
4379 "winreg_QueryInfoKey",
4380 sizeof(struct winreg_QueryInfoKey
),
4381 (ndr_push_flags_fn_t
) ndr_push_winreg_QueryInfoKey
,
4382 (ndr_pull_flags_fn_t
) ndr_pull_winreg_QueryInfoKey
,
4383 (ndr_print_function_t
) ndr_print_winreg_QueryInfoKey
,
4387 "winreg_QueryValue",
4388 sizeof(struct winreg_QueryValue
),
4389 (ndr_push_flags_fn_t
) ndr_push_winreg_QueryValue
,
4390 (ndr_pull_flags_fn_t
) ndr_pull_winreg_QueryValue
,
4391 (ndr_print_function_t
) ndr_print_winreg_QueryValue
,
4395 "winreg_ReplaceKey",
4396 sizeof(struct winreg_ReplaceKey
),
4397 (ndr_push_flags_fn_t
) ndr_push_winreg_ReplaceKey
,
4398 (ndr_pull_flags_fn_t
) ndr_pull_winreg_ReplaceKey
,
4399 (ndr_print_function_t
) ndr_print_winreg_ReplaceKey
,
4403 "winreg_RestoreKey",
4404 sizeof(struct winreg_RestoreKey
),
4405 (ndr_push_flags_fn_t
) ndr_push_winreg_RestoreKey
,
4406 (ndr_pull_flags_fn_t
) ndr_pull_winreg_RestoreKey
,
4407 (ndr_print_function_t
) ndr_print_winreg_RestoreKey
,
4412 sizeof(struct winreg_SaveKey
),
4413 (ndr_push_flags_fn_t
) ndr_push_winreg_SaveKey
,
4414 (ndr_pull_flags_fn_t
) ndr_pull_winreg_SaveKey
,
4415 (ndr_print_function_t
) ndr_print_winreg_SaveKey
,
4419 "winreg_SetKeySecurity",
4420 sizeof(struct winreg_SetKeySecurity
),
4421 (ndr_push_flags_fn_t
) ndr_push_winreg_SetKeySecurity
,
4422 (ndr_pull_flags_fn_t
) ndr_pull_winreg_SetKeySecurity
,
4423 (ndr_print_function_t
) ndr_print_winreg_SetKeySecurity
,
4428 sizeof(struct winreg_SetValue
),
4429 (ndr_push_flags_fn_t
) ndr_push_winreg_SetValue
,
4430 (ndr_pull_flags_fn_t
) ndr_pull_winreg_SetValue
,
4431 (ndr_print_function_t
) ndr_print_winreg_SetValue
,
4436 sizeof(struct winreg_UnLoadKey
),
4437 (ndr_push_flags_fn_t
) ndr_push_winreg_UnLoadKey
,
4438 (ndr_pull_flags_fn_t
) ndr_pull_winreg_UnLoadKey
,
4439 (ndr_print_function_t
) ndr_print_winreg_UnLoadKey
,
4443 "winreg_InitiateSystemShutdown",
4444 sizeof(struct winreg_InitiateSystemShutdown
),
4445 (ndr_push_flags_fn_t
) ndr_push_winreg_InitiateSystemShutdown
,
4446 (ndr_pull_flags_fn_t
) ndr_pull_winreg_InitiateSystemShutdown
,
4447 (ndr_print_function_t
) ndr_print_winreg_InitiateSystemShutdown
,
4451 "winreg_AbortSystemShutdown",
4452 sizeof(struct winreg_AbortSystemShutdown
),
4453 (ndr_push_flags_fn_t
) ndr_push_winreg_AbortSystemShutdown
,
4454 (ndr_pull_flags_fn_t
) ndr_pull_winreg_AbortSystemShutdown
,
4455 (ndr_print_function_t
) ndr_print_winreg_AbortSystemShutdown
,
4459 "winreg_GetVersion",
4460 sizeof(struct winreg_GetVersion
),
4461 (ndr_push_flags_fn_t
) ndr_push_winreg_GetVersion
,
4462 (ndr_pull_flags_fn_t
) ndr_pull_winreg_GetVersion
,
4463 (ndr_print_function_t
) ndr_print_winreg_GetVersion
,
4468 sizeof(struct winreg_OpenHKCC
),
4469 (ndr_push_flags_fn_t
) ndr_push_winreg_OpenHKCC
,
4470 (ndr_pull_flags_fn_t
) ndr_pull_winreg_OpenHKCC
,
4471 (ndr_print_function_t
) ndr_print_winreg_OpenHKCC
,
4476 sizeof(struct winreg_OpenHKDD
),
4477 (ndr_push_flags_fn_t
) ndr_push_winreg_OpenHKDD
,
4478 (ndr_pull_flags_fn_t
) ndr_pull_winreg_OpenHKDD
,
4479 (ndr_print_function_t
) ndr_print_winreg_OpenHKDD
,
4483 "winreg_QueryMultipleValues",
4484 sizeof(struct winreg_QueryMultipleValues
),
4485 (ndr_push_flags_fn_t
) ndr_push_winreg_QueryMultipleValues
,
4486 (ndr_pull_flags_fn_t
) ndr_pull_winreg_QueryMultipleValues
,
4487 (ndr_print_function_t
) ndr_print_winreg_QueryMultipleValues
,
4491 "winreg_InitiateSystemShutdownEx",
4492 sizeof(struct winreg_InitiateSystemShutdownEx
),
4493 (ndr_push_flags_fn_t
) ndr_push_winreg_InitiateSystemShutdownEx
,
4494 (ndr_pull_flags_fn_t
) ndr_pull_winreg_InitiateSystemShutdownEx
,
4495 (ndr_print_function_t
) ndr_print_winreg_InitiateSystemShutdownEx
,
4500 sizeof(struct winreg_SaveKeyEx
),
4501 (ndr_push_flags_fn_t
) ndr_push_winreg_SaveKeyEx
,
4502 (ndr_pull_flags_fn_t
) ndr_pull_winreg_SaveKeyEx
,
4503 (ndr_print_function_t
) ndr_print_winreg_SaveKeyEx
,
4508 sizeof(struct winreg_OpenHKPT
),
4509 (ndr_push_flags_fn_t
) ndr_push_winreg_OpenHKPT
,
4510 (ndr_pull_flags_fn_t
) ndr_pull_winreg_OpenHKPT
,
4511 (ndr_print_function_t
) ndr_print_winreg_OpenHKPT
,
4516 sizeof(struct winreg_OpenHKPN
),
4517 (ndr_push_flags_fn_t
) ndr_push_winreg_OpenHKPN
,
4518 (ndr_pull_flags_fn_t
) ndr_pull_winreg_OpenHKPN
,
4519 (ndr_print_function_t
) ndr_print_winreg_OpenHKPN
,
4523 "winreg_QueryMultipleValues2",
4524 sizeof(struct winreg_QueryMultipleValues2
),
4525 (ndr_push_flags_fn_t
) ndr_push_winreg_QueryMultipleValues2
,
4526 (ndr_pull_flags_fn_t
) ndr_pull_winreg_QueryMultipleValues2
,
4527 (ndr_print_function_t
) ndr_print_winreg_QueryMultipleValues2
,
4530 { NULL
, 0, NULL
, NULL
, NULL
, false }
4533 static const char * const winreg_endpoint_strings
[] = {
4534 "ncacn_np:[\\pipe\\winreg]",
4539 static const struct ndr_interface_string_array winreg_endpoints
= {
4541 .names
= winreg_endpoint_strings
4544 static const char * const winreg_authservice_strings
[] = {
4548 static const struct ndr_interface_string_array winreg_authservices
= {
4550 .names
= winreg_authservice_strings
4554 const struct ndr_interface_table ndr_table_winreg
= {
4557 {0x338cd001,0x2244,0x31f1,{0xaa,0xaa},{0x90,0x00,0x38,0x00,0x10,0x03}},
4560 .helpstring
= NDR_WINREG_HELPSTRING
,
4562 .calls
= winreg_calls
,
4563 .endpoints
= &winreg_endpoints
,
4564 .authservices
= &winreg_authservices