r21462: Fix EnumValue (?)
[ira/wip.git] / source3 / librpc / gen_ndr / cli_winreg.c
1 /*
2  * Unix SMB/CIFS implementation.
3  * client auto-generated by pidl. DO NOT MODIFY!
4  */
5
6 #include "includes.h"
7 #include "librpc/gen_ndr/cli_winreg.h"
8
9 NTSTATUS rpccli_winreg_OpenHKCR(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
10 {
11         struct winreg_OpenHKCR r;
12         NTSTATUS status;
13         
14         /* In parameters */
15         r.in.system_name = system_name;
16         r.in.access_mask = access_mask;
17         
18         if (DEBUGLEVEL >= 10)
19                 NDR_PRINT_IN_DEBUG(winreg_OpenHKCR, &r);
20         
21         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKCR, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKCR, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKCR);
22         
23         if (!NT_STATUS_IS_OK(status)) {
24                 return status;
25         }
26         
27         if (DEBUGLEVEL >= 10)
28                 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR, &r);
29         
30         if (NT_STATUS_IS_ERR(status)) {
31                 return status;
32         }
33         
34         /* Return variables */
35         *handle = *r.out.handle;
36         
37         /* Return result */
38         return werror_to_ntstatus(r.out.result);
39 }
40
41 NTSTATUS rpccli_winreg_OpenHKCU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
42 {
43         struct winreg_OpenHKCU r;
44         NTSTATUS status;
45         
46         /* In parameters */
47         r.in.system_name = system_name;
48         r.in.access_mask = access_mask;
49         
50         if (DEBUGLEVEL >= 10)
51                 NDR_PRINT_IN_DEBUG(winreg_OpenHKCU, &r);
52         
53         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKCU, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKCU, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKCU);
54         
55         if (!NT_STATUS_IS_OK(status)) {
56                 return status;
57         }
58         
59         if (DEBUGLEVEL >= 10)
60                 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU, &r);
61         
62         if (NT_STATUS_IS_ERR(status)) {
63                 return status;
64         }
65         
66         /* Return variables */
67         *handle = *r.out.handle;
68         
69         /* Return result */
70         return werror_to_ntstatus(r.out.result);
71 }
72
73 NTSTATUS rpccli_winreg_OpenHKLM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
74 {
75         struct winreg_OpenHKLM r;
76         NTSTATUS status;
77         
78         /* In parameters */
79         r.in.system_name = system_name;
80         r.in.access_mask = access_mask;
81         
82         if (DEBUGLEVEL >= 10)
83                 NDR_PRINT_IN_DEBUG(winreg_OpenHKLM, &r);
84         
85         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKLM, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKLM, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKLM);
86         
87         if (!NT_STATUS_IS_OK(status)) {
88                 return status;
89         }
90         
91         if (DEBUGLEVEL >= 10)
92                 NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM, &r);
93         
94         if (NT_STATUS_IS_ERR(status)) {
95                 return status;
96         }
97         
98         /* Return variables */
99         *handle = *r.out.handle;
100         
101         /* Return result */
102         return werror_to_ntstatus(r.out.result);
103 }
104
105 NTSTATUS rpccli_winreg_OpenHKPD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
106 {
107         struct winreg_OpenHKPD r;
108         NTSTATUS status;
109         
110         /* In parameters */
111         r.in.system_name = system_name;
112         r.in.access_mask = access_mask;
113         
114         if (DEBUGLEVEL >= 10)
115                 NDR_PRINT_IN_DEBUG(winreg_OpenHKPD, &r);
116         
117         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKPD, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKPD, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKPD);
118         
119         if (!NT_STATUS_IS_OK(status)) {
120                 return status;
121         }
122         
123         if (DEBUGLEVEL >= 10)
124                 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD, &r);
125         
126         if (NT_STATUS_IS_ERR(status)) {
127                 return status;
128         }
129         
130         /* Return variables */
131         *handle = *r.out.handle;
132         
133         /* Return result */
134         return werror_to_ntstatus(r.out.result);
135 }
136
137 NTSTATUS rpccli_winreg_OpenHKU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
138 {
139         struct winreg_OpenHKU r;
140         NTSTATUS status;
141         
142         /* In parameters */
143         r.in.system_name = system_name;
144         r.in.access_mask = access_mask;
145         
146         if (DEBUGLEVEL >= 10)
147                 NDR_PRINT_IN_DEBUG(winreg_OpenHKU, &r);
148         
149         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKU, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKU, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKU);
150         
151         if (!NT_STATUS_IS_OK(status)) {
152                 return status;
153         }
154         
155         if (DEBUGLEVEL >= 10)
156                 NDR_PRINT_OUT_DEBUG(winreg_OpenHKU, &r);
157         
158         if (NT_STATUS_IS_ERR(status)) {
159                 return status;
160         }
161         
162         /* Return variables */
163         *handle = *r.out.handle;
164         
165         /* Return result */
166         return werror_to_ntstatus(r.out.result);
167 }
168
169 NTSTATUS rpccli_winreg_CloseKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
170 {
171         struct winreg_CloseKey r;
172         NTSTATUS status;
173         
174         /* In parameters */
175         r.in.handle = handle;
176         
177         if (DEBUGLEVEL >= 10)
178                 NDR_PRINT_IN_DEBUG(winreg_CloseKey, &r);
179         
180         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_CLOSEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_CloseKey, (ndr_push_flags_fn_t)ndr_push_winreg_CloseKey);
181         
182         if (!NT_STATUS_IS_OK(status)) {
183                 return status;
184         }
185         
186         if (DEBUGLEVEL >= 10)
187                 NDR_PRINT_OUT_DEBUG(winreg_CloseKey, &r);
188         
189         if (NT_STATUS_IS_ERR(status)) {
190                 return status;
191         }
192         
193         /* Return variables */
194         *handle = *r.out.handle;
195         
196         /* Return result */
197         return werror_to_ntstatus(r.out.result);
198 }
199
200 NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String name, struct winreg_String keyclass, uint32_t options, uint32_t access_mask, struct winreg_SecBuf *secdesc, struct policy_handle *new_handle, enum winreg_CreateAction *action_taken)
201 {
202         struct winreg_CreateKey r;
203         NTSTATUS status;
204         
205         /* In parameters */
206         r.in.handle = handle;
207         r.in.name = name;
208         r.in.keyclass = keyclass;
209         r.in.options = options;
210         r.in.access_mask = access_mask;
211         r.in.secdesc = secdesc;
212         r.in.action_taken = action_taken;
213         
214         if (DEBUGLEVEL >= 10)
215                 NDR_PRINT_IN_DEBUG(winreg_CreateKey, &r);
216         
217         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_CREATEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_CreateKey, (ndr_push_flags_fn_t)ndr_push_winreg_CreateKey);
218         
219         if (!NT_STATUS_IS_OK(status)) {
220                 return status;
221         }
222         
223         if (DEBUGLEVEL >= 10)
224                 NDR_PRINT_OUT_DEBUG(winreg_CreateKey, &r);
225         
226         if (NT_STATUS_IS_ERR(status)) {
227                 return status;
228         }
229         
230         /* Return variables */
231         *new_handle = *r.out.new_handle;
232         if ( action_taken ) {
233                 *action_taken = *r.out.action_taken;
234         }
235         
236         /* Return result */
237         return werror_to_ntstatus(r.out.result);
238 }
239
240 NTSTATUS rpccli_winreg_DeleteKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String key)
241 {
242         struct winreg_DeleteKey r;
243         NTSTATUS status;
244         
245         /* In parameters */
246         r.in.handle = handle;
247         r.in.key = key;
248         
249         if (DEBUGLEVEL >= 10)
250                 NDR_PRINT_IN_DEBUG(winreg_DeleteKey, &r);
251         
252         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_DELETEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_DeleteKey, (ndr_push_flags_fn_t)ndr_push_winreg_DeleteKey);
253         
254         if (!NT_STATUS_IS_OK(status)) {
255                 return status;
256         }
257         
258         if (DEBUGLEVEL >= 10)
259                 NDR_PRINT_OUT_DEBUG(winreg_DeleteKey, &r);
260         
261         if (NT_STATUS_IS_ERR(status)) {
262                 return status;
263         }
264         
265         /* Return variables */
266         
267         /* Return result */
268         return werror_to_ntstatus(r.out.result);
269 }
270
271 NTSTATUS rpccli_winreg_DeleteValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value)
272 {
273         struct winreg_DeleteValue r;
274         NTSTATUS status;
275         
276         /* In parameters */
277         r.in.handle = handle;
278         r.in.value = value;
279         
280         if (DEBUGLEVEL >= 10)
281                 NDR_PRINT_IN_DEBUG(winreg_DeleteValue, &r);
282         
283         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_DELETEVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_DeleteValue, (ndr_push_flags_fn_t)ndr_push_winreg_DeleteValue);
284         
285         if (!NT_STATUS_IS_OK(status)) {
286                 return status;
287         }
288         
289         if (DEBUGLEVEL >= 10)
290                 NDR_PRINT_OUT_DEBUG(winreg_DeleteValue, &r);
291         
292         if (NT_STATUS_IS_ERR(status)) {
293                 return status;
294         }
295         
296         /* Return variables */
297         
298         /* Return result */
299         return werror_to_ntstatus(r.out.result);
300 }
301
302 NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t enum_index, struct winreg_StringBuf *name, struct winreg_StringBuf *keyclass, NTTIME *last_changed_time)
303 {
304         struct winreg_EnumKey r;
305         NTSTATUS status;
306         
307         /* In parameters */
308         r.in.handle = handle;
309         r.in.enum_index = enum_index;
310         r.in.name = name;
311         r.in.keyclass = keyclass;
312         r.in.last_changed_time = last_changed_time;
313         
314         if (DEBUGLEVEL >= 10)
315                 NDR_PRINT_IN_DEBUG(winreg_EnumKey, &r);
316         
317         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_ENUMKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_EnumKey, (ndr_push_flags_fn_t)ndr_push_winreg_EnumKey);
318         
319         if (!NT_STATUS_IS_OK(status)) {
320                 return status;
321         }
322         
323         if (DEBUGLEVEL >= 10)
324                 NDR_PRINT_OUT_DEBUG(winreg_EnumKey, &r);
325         
326         if (NT_STATUS_IS_ERR(status)) {
327                 return status;
328         }
329         
330         /* Return variables */
331         *name = *r.out.name;
332         if ( keyclass ) {
333                 *keyclass = *r.out.keyclass;
334         }
335         if ( last_changed_time ) {
336                 *last_changed_time = *r.out.last_changed_time;
337         }
338         
339         /* Return result */
340         return werror_to_ntstatus(r.out.result);
341 }
342
343 NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t enum_index, struct winreg_ValNameBuf *name, enum winreg_Type *type, uint8_t *value, uint32_t *size, uint32_t *length)
344 {
345         struct winreg_EnumValue r;
346         NTSTATUS status;
347         
348         /* In parameters */
349         r.in.handle = handle;
350         r.in.enum_index = enum_index;
351         r.in.name = name;
352         r.in.type = type;
353         r.in.value = value;
354         r.in.size = size;
355         r.in.length = length;
356         
357         if (DEBUGLEVEL >= 10)
358                 NDR_PRINT_IN_DEBUG(winreg_EnumValue, &r);
359         
360         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_ENUMVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_EnumValue, (ndr_push_flags_fn_t)ndr_push_winreg_EnumValue);
361         
362         if (!NT_STATUS_IS_OK(status)) {
363                 return status;
364         }
365         
366         if (DEBUGLEVEL >= 10)
367                 NDR_PRINT_OUT_DEBUG(winreg_EnumValue, &r);
368         
369         if (NT_STATUS_IS_ERR(status)) {
370                 return status;
371         }
372         
373         /* Return variables */
374         *name = *r.out.name;
375         if ( type ) {
376                 *type = *r.out.type;
377         }
378         if ( value ) {
379                 *value = *r.out.value;
380         }
381         if ( size ) {
382                 *size = *r.out.size;
383         }
384         if ( length ) {
385                 *length = *r.out.length;
386         }
387         
388         /* Return result */
389         return werror_to_ntstatus(r.out.result);
390 }
391
392 NTSTATUS rpccli_winreg_FlushKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
393 {
394         struct winreg_FlushKey r;
395         NTSTATUS status;
396         
397         /* In parameters */
398         r.in.handle = handle;
399         
400         if (DEBUGLEVEL >= 10)
401                 NDR_PRINT_IN_DEBUG(winreg_FlushKey, &r);
402         
403         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_FLUSHKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_FlushKey, (ndr_push_flags_fn_t)ndr_push_winreg_FlushKey);
404         
405         if (!NT_STATUS_IS_OK(status)) {
406                 return status;
407         }
408         
409         if (DEBUGLEVEL >= 10)
410                 NDR_PRINT_OUT_DEBUG(winreg_FlushKey, &r);
411         
412         if (NT_STATUS_IS_ERR(status)) {
413                 return status;
414         }
415         
416         /* Return variables */
417         
418         /* Return result */
419         return werror_to_ntstatus(r.out.result);
420 }
421
422 NTSTATUS rpccli_winreg_GetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, struct KeySecurityData *sd)
423 {
424         struct winreg_GetKeySecurity r;
425         NTSTATUS status;
426         
427         /* In parameters */
428         r.in.handle = handle;
429         r.in.sec_info = sec_info;
430         r.in.sd = sd;
431         
432         if (DEBUGLEVEL >= 10)
433                 NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity, &r);
434         
435         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_GETKEYSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_GetKeySecurity, (ndr_push_flags_fn_t)ndr_push_winreg_GetKeySecurity);
436         
437         if (!NT_STATUS_IS_OK(status)) {
438                 return status;
439         }
440         
441         if (DEBUGLEVEL >= 10)
442                 NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity, &r);
443         
444         if (NT_STATUS_IS_ERR(status)) {
445                 return status;
446         }
447         
448         /* Return variables */
449         *sd = *r.out.sd;
450         
451         /* Return result */
452         return werror_to_ntstatus(r.out.result);
453 }
454
455 NTSTATUS rpccli_winreg_LoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *keyname, struct winreg_String *filename)
456 {
457         struct winreg_LoadKey r;
458         NTSTATUS status;
459         
460         /* In parameters */
461         r.in.handle = handle;
462         r.in.keyname = keyname;
463         r.in.filename = filename;
464         
465         if (DEBUGLEVEL >= 10)
466                 NDR_PRINT_IN_DEBUG(winreg_LoadKey, &r);
467         
468         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_LOADKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_LoadKey, (ndr_push_flags_fn_t)ndr_push_winreg_LoadKey);
469         
470         if (!NT_STATUS_IS_OK(status)) {
471                 return status;
472         }
473         
474         if (DEBUGLEVEL >= 10)
475                 NDR_PRINT_OUT_DEBUG(winreg_LoadKey, &r);
476         
477         if (NT_STATUS_IS_ERR(status)) {
478                 return status;
479         }
480         
481         /* Return variables */
482         
483         /* Return result */
484         return werror_to_ntstatus(r.out.result);
485 }
486
487 NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t watch_subtree, uint32_t notify_filter, uint32_t unknown, struct winreg_String string1, struct winreg_String string2, uint32_t unknown2)
488 {
489         struct winreg_NotifyChangeKeyValue r;
490         NTSTATUS status;
491         
492         /* In parameters */
493         r.in.handle = handle;
494         r.in.watch_subtree = watch_subtree;
495         r.in.notify_filter = notify_filter;
496         r.in.unknown = unknown;
497         r.in.string1 = string1;
498         r.in.string2 = string2;
499         r.in.unknown2 = unknown2;
500         
501         if (DEBUGLEVEL >= 10)
502                 NDR_PRINT_IN_DEBUG(winreg_NotifyChangeKeyValue, &r);
503         
504         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_NOTIFYCHANGEKEYVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_NotifyChangeKeyValue, (ndr_push_flags_fn_t)ndr_push_winreg_NotifyChangeKeyValue);
505         
506         if (!NT_STATUS_IS_OK(status)) {
507                 return status;
508         }
509         
510         if (DEBUGLEVEL >= 10)
511                 NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue, &r);
512         
513         if (NT_STATUS_IS_ERR(status)) {
514                 return status;
515         }
516         
517         /* Return variables */
518         
519         /* Return result */
520         return werror_to_ntstatus(r.out.result);
521 }
522
523 NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *parent_handle, struct winreg_String keyname, uint32_t unknown, uint32_t access_mask, struct policy_handle *handle)
524 {
525         struct winreg_OpenKey r;
526         NTSTATUS status;
527         
528         /* In parameters */
529         r.in.parent_handle = parent_handle;
530         r.in.keyname = keyname;
531         r.in.unknown = unknown;
532         r.in.access_mask = access_mask;
533         
534         if (DEBUGLEVEL >= 10)
535                 NDR_PRINT_IN_DEBUG(winreg_OpenKey, &r);
536         
537         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenKey, (ndr_push_flags_fn_t)ndr_push_winreg_OpenKey);
538         
539         if (!NT_STATUS_IS_OK(status)) {
540                 return status;
541         }
542         
543         if (DEBUGLEVEL >= 10)
544                 NDR_PRINT_OUT_DEBUG(winreg_OpenKey, &r);
545         
546         if (NT_STATUS_IS_ERR(status)) {
547                 return status;
548         }
549         
550         /* Return variables */
551         *handle = *r.out.handle;
552         
553         /* Return result */
554         return werror_to_ntstatus(r.out.result);
555 }
556
557 NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *classname, uint32_t *num_subkeys, uint32_t *max_subkeylen, uint32_t *max_classlen, uint32_t *num_values, uint32_t *max_valnamelen, uint32_t *max_valbufsize, uint32_t *secdescsize, NTTIME *last_changed_time)
558 {
559         struct winreg_QueryInfoKey r;
560         NTSTATUS status;
561         
562         /* In parameters */
563         r.in.handle = handle;
564         r.in.classname = classname;
565         
566         if (DEBUGLEVEL >= 10)
567                 NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey, &r);
568         
569         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYINFOKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryInfoKey, (ndr_push_flags_fn_t)ndr_push_winreg_QueryInfoKey);
570         
571         if (!NT_STATUS_IS_OK(status)) {
572                 return status;
573         }
574         
575         if (DEBUGLEVEL >= 10)
576                 NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey, &r);
577         
578         if (NT_STATUS_IS_ERR(status)) {
579                 return status;
580         }
581         
582         /* Return variables */
583         *classname = *r.out.classname;
584         *num_subkeys = *r.out.num_subkeys;
585         *max_subkeylen = *r.out.max_subkeylen;
586         *max_classlen = *r.out.max_classlen;
587         *num_values = *r.out.num_values;
588         *max_valnamelen = *r.out.max_valnamelen;
589         *max_valbufsize = *r.out.max_valbufsize;
590         *secdescsize = *r.out.secdescsize;
591         *last_changed_time = *r.out.last_changed_time;
592         
593         /* Return result */
594         return werror_to_ntstatus(r.out.result);
595 }
596
597 NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum winreg_Type *type, uint8_t *data, uint32_t *data_size, uint32_t *value_length)
598 {
599         struct winreg_QueryValue r;
600         NTSTATUS status;
601         
602         /* In parameters */
603         r.in.handle = handle;
604         r.in.value_name = value_name;
605         r.in.type = type;
606         r.in.data = data;
607         r.in.data_size = data_size;
608         r.in.value_length = value_length;
609         
610         if (DEBUGLEVEL >= 10)
611                 NDR_PRINT_IN_DEBUG(winreg_QueryValue, &r);
612         
613         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryValue, (ndr_push_flags_fn_t)ndr_push_winreg_QueryValue);
614         
615         if (!NT_STATUS_IS_OK(status)) {
616                 return status;
617         }
618         
619         if (DEBUGLEVEL >= 10)
620                 NDR_PRINT_OUT_DEBUG(winreg_QueryValue, &r);
621         
622         if (NT_STATUS_IS_ERR(status)) {
623                 return status;
624         }
625         
626         /* Return variables */
627         if ( type ) {
628                 *type = *r.out.type;
629         }
630         if ( data ) {
631                 *data = *r.out.data;
632         }
633         if ( data_size ) {
634                 *data_size = *r.out.data_size;
635         }
636         if ( value_length ) {
637                 *value_length = *r.out.value_length;
638         }
639         
640         /* Return result */
641         return werror_to_ntstatus(r.out.result);
642 }
643
644 NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
645 {
646         struct winreg_ReplaceKey r;
647         NTSTATUS status;
648         
649         /* In parameters */
650         
651         if (DEBUGLEVEL >= 10)
652                 NDR_PRINT_IN_DEBUG(winreg_ReplaceKey, &r);
653         
654         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_REPLACEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_ReplaceKey, (ndr_push_flags_fn_t)ndr_push_winreg_ReplaceKey);
655         
656         if (!NT_STATUS_IS_OK(status)) {
657                 return status;
658         }
659         
660         if (DEBUGLEVEL >= 10)
661                 NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey, &r);
662         
663         if (NT_STATUS_IS_ERR(status)) {
664                 return status;
665         }
666         
667         /* Return variables */
668         
669         /* Return result */
670         return werror_to_ntstatus(r.out.result);
671 }
672
673 NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *filename, uint32_t flags)
674 {
675         struct winreg_RestoreKey r;
676         NTSTATUS status;
677         
678         /* In parameters */
679         r.in.handle = handle;
680         r.in.filename = filename;
681         r.in.flags = flags;
682         
683         if (DEBUGLEVEL >= 10)
684                 NDR_PRINT_IN_DEBUG(winreg_RestoreKey, &r);
685         
686         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_RESTOREKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_RestoreKey, (ndr_push_flags_fn_t)ndr_push_winreg_RestoreKey);
687         
688         if (!NT_STATUS_IS_OK(status)) {
689                 return status;
690         }
691         
692         if (DEBUGLEVEL >= 10)
693                 NDR_PRINT_OUT_DEBUG(winreg_RestoreKey, &r);
694         
695         if (NT_STATUS_IS_ERR(status)) {
696                 return status;
697         }
698         
699         /* Return variables */
700         
701         /* Return result */
702         return werror_to_ntstatus(r.out.result);
703 }
704
705 NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *filename, struct KeySecurityAttribute *sec_attrib)
706 {
707         struct winreg_SaveKey r;
708         NTSTATUS status;
709         
710         /* In parameters */
711         r.in.handle = handle;
712         r.in.filename = filename;
713         r.in.sec_attrib = sec_attrib;
714         
715         if (DEBUGLEVEL >= 10)
716                 NDR_PRINT_IN_DEBUG(winreg_SaveKey, &r);
717         
718         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SAVEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SaveKey, (ndr_push_flags_fn_t)ndr_push_winreg_SaveKey);
719         
720         if (!NT_STATUS_IS_OK(status)) {
721                 return status;
722         }
723         
724         if (DEBUGLEVEL >= 10)
725                 NDR_PRINT_OUT_DEBUG(winreg_SaveKey, &r);
726         
727         if (NT_STATUS_IS_ERR(status)) {
728                 return status;
729         }
730         
731         /* Return variables */
732         
733         /* Return result */
734         return werror_to_ntstatus(r.out.result);
735 }
736
737 NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t access_mask, struct KeySecurityData *sd)
738 {
739         struct winreg_SetKeySecurity r;
740         NTSTATUS status;
741         
742         /* In parameters */
743         r.in.handle = handle;
744         r.in.access_mask = access_mask;
745         r.in.sd = sd;
746         
747         if (DEBUGLEVEL >= 10)
748                 NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity, &r);
749         
750         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SETKEYSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SetKeySecurity, (ndr_push_flags_fn_t)ndr_push_winreg_SetKeySecurity);
751         
752         if (!NT_STATUS_IS_OK(status)) {
753                 return status;
754         }
755         
756         if (DEBUGLEVEL >= 10)
757                 NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity, &r);
758         
759         if (NT_STATUS_IS_ERR(status)) {
760                 return status;
761         }
762         
763         /* Return variables */
764         
765         /* Return result */
766         return werror_to_ntstatus(r.out.result);
767 }
768
769 NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String name, enum winreg_Type type, uint8_t *data, uint32_t size)
770 {
771         struct winreg_SetValue r;
772         NTSTATUS status;
773         
774         /* In parameters */
775         r.in.handle = handle;
776         r.in.name = name;
777         r.in.type = type;
778         r.in.data = data;
779         r.in.size = size;
780         
781         if (DEBUGLEVEL >= 10)
782                 NDR_PRINT_IN_DEBUG(winreg_SetValue, &r);
783         
784         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SETVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SetValue, (ndr_push_flags_fn_t)ndr_push_winreg_SetValue);
785         
786         if (!NT_STATUS_IS_OK(status)) {
787                 return status;
788         }
789         
790         if (DEBUGLEVEL >= 10)
791                 NDR_PRINT_OUT_DEBUG(winreg_SetValue, &r);
792         
793         if (NT_STATUS_IS_ERR(status)) {
794                 return status;
795         }
796         
797         /* Return variables */
798         
799         /* Return result */
800         return werror_to_ntstatus(r.out.result);
801 }
802
803 NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
804 {
805         struct winreg_UnLoadKey r;
806         NTSTATUS status;
807         
808         /* In parameters */
809         
810         if (DEBUGLEVEL >= 10)
811                 NDR_PRINT_IN_DEBUG(winreg_UnLoadKey, &r);
812         
813         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_UNLOADKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_UnLoadKey, (ndr_push_flags_fn_t)ndr_push_winreg_UnLoadKey);
814         
815         if (!NT_STATUS_IS_OK(status)) {
816                 return status;
817         }
818         
819         if (DEBUGLEVEL >= 10)
820                 NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey, &r);
821         
822         if (NT_STATUS_IS_ERR(status)) {
823                 return status;
824         }
825         
826         /* Return variables */
827         
828         /* Return result */
829         return werror_to_ntstatus(r.out.result);
830 }
831
832 NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot)
833 {
834         struct winreg_InitiateSystemShutdown r;
835         NTSTATUS status;
836         
837         /* In parameters */
838         r.in.hostname = hostname;
839         r.in.message = message;
840         r.in.timeout = timeout;
841         r.in.force_apps = force_apps;
842         r.in.reboot = reboot;
843         
844         if (DEBUGLEVEL >= 10)
845                 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown, &r);
846         
847         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_INITIATESYSTEMSHUTDOWN, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_InitiateSystemShutdown, (ndr_push_flags_fn_t)ndr_push_winreg_InitiateSystemShutdown);
848         
849         if (!NT_STATUS_IS_OK(status)) {
850                 return status;
851         }
852         
853         if (DEBUGLEVEL >= 10)
854                 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown, &r);
855         
856         if (NT_STATUS_IS_ERR(status)) {
857                 return status;
858         }
859         
860         /* Return variables */
861         
862         /* Return result */
863         return werror_to_ntstatus(r.out.result);
864 }
865
866 NTSTATUS rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *server)
867 {
868         struct winreg_AbortSystemShutdown r;
869         NTSTATUS status;
870         
871         /* In parameters */
872         r.in.server = server;
873         
874         if (DEBUGLEVEL >= 10)
875                 NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown, &r);
876         
877         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_ABORTSYSTEMSHUTDOWN, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_AbortSystemShutdown, (ndr_push_flags_fn_t)ndr_push_winreg_AbortSystemShutdown);
878         
879         if (!NT_STATUS_IS_OK(status)) {
880                 return status;
881         }
882         
883         if (DEBUGLEVEL >= 10)
884                 NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown, &r);
885         
886         if (NT_STATUS_IS_ERR(status)) {
887                 return status;
888         }
889         
890         /* Return variables */
891         
892         /* Return result */
893         return werror_to_ntstatus(r.out.result);
894 }
895
896 NTSTATUS rpccli_winreg_GetVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *version)
897 {
898         struct winreg_GetVersion r;
899         NTSTATUS status;
900         
901         /* In parameters */
902         r.in.handle = handle;
903         
904         if (DEBUGLEVEL >= 10)
905                 NDR_PRINT_IN_DEBUG(winreg_GetVersion, &r);
906         
907         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_GETVERSION, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_GetVersion, (ndr_push_flags_fn_t)ndr_push_winreg_GetVersion);
908         
909         if (!NT_STATUS_IS_OK(status)) {
910                 return status;
911         }
912         
913         if (DEBUGLEVEL >= 10)
914                 NDR_PRINT_OUT_DEBUG(winreg_GetVersion, &r);
915         
916         if (NT_STATUS_IS_ERR(status)) {
917                 return status;
918         }
919         
920         /* Return variables */
921         *version = *r.out.version;
922         
923         /* Return result */
924         return werror_to_ntstatus(r.out.result);
925 }
926
927 NTSTATUS rpccli_winreg_OpenHKCC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
928 {
929         struct winreg_OpenHKCC r;
930         NTSTATUS status;
931         
932         /* In parameters */
933         r.in.system_name = system_name;
934         r.in.access_mask = access_mask;
935         
936         if (DEBUGLEVEL >= 10)
937                 NDR_PRINT_IN_DEBUG(winreg_OpenHKCC, &r);
938         
939         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKCC, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKCC, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKCC);
940         
941         if (!NT_STATUS_IS_OK(status)) {
942                 return status;
943         }
944         
945         if (DEBUGLEVEL >= 10)
946                 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC, &r);
947         
948         if (NT_STATUS_IS_ERR(status)) {
949                 return status;
950         }
951         
952         /* Return variables */
953         *handle = *r.out.handle;
954         
955         /* Return result */
956         return werror_to_ntstatus(r.out.result);
957 }
958
959 NTSTATUS rpccli_winreg_OpenHKDD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
960 {
961         struct winreg_OpenHKDD r;
962         NTSTATUS status;
963         
964         /* In parameters */
965         r.in.system_name = system_name;
966         r.in.access_mask = access_mask;
967         
968         if (DEBUGLEVEL >= 10)
969                 NDR_PRINT_IN_DEBUG(winreg_OpenHKDD, &r);
970         
971         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKDD, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKDD, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKDD);
972         
973         if (!NT_STATUS_IS_OK(status)) {
974                 return status;
975         }
976         
977         if (DEBUGLEVEL >= 10)
978                 NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD, &r);
979         
980         if (NT_STATUS_IS_ERR(status)) {
981                 return status;
982         }
983         
984         /* Return variables */
985         *handle = *r.out.handle;
986         
987         /* Return result */
988         return werror_to_ntstatus(r.out.result);
989 }
990
991 NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *key_handle, struct QueryMultipleValue *values, uint32_t num_values, uint8_t *buffer, uint32_t *buffer_size)
992 {
993         struct winreg_QueryMultipleValues r;
994         NTSTATUS status;
995         
996         /* In parameters */
997         r.in.key_handle = key_handle;
998         r.in.values = values;
999         r.in.num_values = num_values;
1000         r.in.buffer = buffer;
1001         r.in.buffer_size = buffer_size;
1002         
1003         if (DEBUGLEVEL >= 10)
1004                 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues, &r);
1005         
1006         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYMULTIPLEVALUES, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryMultipleValues, (ndr_push_flags_fn_t)ndr_push_winreg_QueryMultipleValues);
1007         
1008         if (!NT_STATUS_IS_OK(status)) {
1009                 return status;
1010         }
1011         
1012         if (DEBUGLEVEL >= 10)
1013                 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues, &r);
1014         
1015         if (NT_STATUS_IS_ERR(status)) {
1016                 return status;
1017         }
1018         
1019         /* Return variables */
1020         *values = *r.out.values;
1021         if ( buffer ) {
1022                 *buffer = *r.out.buffer;
1023         }
1024         *buffer_size = *r.out.buffer_size;
1025         
1026         /* Return result */
1027         return werror_to_ntstatus(r.out.result);
1028 }
1029
1030 NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot, uint32_t reason)
1031 {
1032         struct winreg_InitiateSystemShutdownEx r;
1033         NTSTATUS status;
1034         
1035         /* In parameters */
1036         r.in.hostname = hostname;
1037         r.in.message = message;
1038         r.in.timeout = timeout;
1039         r.in.force_apps = force_apps;
1040         r.in.reboot = reboot;
1041         r.in.reason = reason;
1042         
1043         if (DEBUGLEVEL >= 10)
1044                 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdownEx, &r);
1045         
1046         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_INITIATESYSTEMSHUTDOWNEX, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_InitiateSystemShutdownEx, (ndr_push_flags_fn_t)ndr_push_winreg_InitiateSystemShutdownEx);
1047         
1048         if (!NT_STATUS_IS_OK(status)) {
1049                 return status;
1050         }
1051         
1052         if (DEBUGLEVEL >= 10)
1053                 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx, &r);
1054         
1055         if (NT_STATUS_IS_ERR(status)) {
1056                 return status;
1057         }
1058         
1059         /* Return variables */
1060         
1061         /* Return result */
1062         return werror_to_ntstatus(r.out.result);
1063 }
1064
1065 NTSTATUS rpccli_winreg_SaveKeyEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1066 {
1067         struct winreg_SaveKeyEx r;
1068         NTSTATUS status;
1069         
1070         /* In parameters */
1071         
1072         if (DEBUGLEVEL >= 10)
1073                 NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx, &r);
1074         
1075         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SAVEKEYEX, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SaveKeyEx, (ndr_push_flags_fn_t)ndr_push_winreg_SaveKeyEx);
1076         
1077         if (!NT_STATUS_IS_OK(status)) {
1078                 return status;
1079         }
1080         
1081         if (DEBUGLEVEL >= 10)
1082                 NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx, &r);
1083         
1084         if (NT_STATUS_IS_ERR(status)) {
1085                 return status;
1086         }
1087         
1088         /* Return variables */
1089         
1090         /* Return result */
1091         return werror_to_ntstatus(r.out.result);
1092 }
1093
1094 NTSTATUS rpccli_winreg_OpenHKPT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
1095 {
1096         struct winreg_OpenHKPT r;
1097         NTSTATUS status;
1098         
1099         /* In parameters */
1100         r.in.system_name = system_name;
1101         r.in.access_mask = access_mask;
1102         
1103         if (DEBUGLEVEL >= 10)
1104                 NDR_PRINT_IN_DEBUG(winreg_OpenHKPT, &r);
1105         
1106         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKPT, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKPT, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKPT);
1107         
1108         if (!NT_STATUS_IS_OK(status)) {
1109                 return status;
1110         }
1111         
1112         if (DEBUGLEVEL >= 10)
1113                 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT, &r);
1114         
1115         if (NT_STATUS_IS_ERR(status)) {
1116                 return status;
1117         }
1118         
1119         /* Return variables */
1120         *handle = *r.out.handle;
1121         
1122         /* Return result */
1123         return werror_to_ntstatus(r.out.result);
1124 }
1125
1126 NTSTATUS rpccli_winreg_OpenHKPN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
1127 {
1128         struct winreg_OpenHKPN r;
1129         NTSTATUS status;
1130         
1131         /* In parameters */
1132         r.in.system_name = system_name;
1133         r.in.access_mask = access_mask;
1134         
1135         if (DEBUGLEVEL >= 10)
1136                 NDR_PRINT_IN_DEBUG(winreg_OpenHKPN, &r);
1137         
1138         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKPN, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKPN, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKPN);
1139         
1140         if (!NT_STATUS_IS_OK(status)) {
1141                 return status;
1142         }
1143         
1144         if (DEBUGLEVEL >= 10)
1145                 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN, &r);
1146         
1147         if (NT_STATUS_IS_ERR(status)) {
1148                 return status;
1149         }
1150         
1151         /* Return variables */
1152         *handle = *r.out.handle;
1153         
1154         /* Return result */
1155         return werror_to_ntstatus(r.out.result);
1156 }
1157
1158 NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1159 {
1160         struct winreg_QueryMultipleValues2 r;
1161         NTSTATUS status;
1162         
1163         /* In parameters */
1164         
1165         if (DEBUGLEVEL >= 10)
1166                 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2, &r);
1167         
1168         status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYMULTIPLEVALUES2, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryMultipleValues2, (ndr_push_flags_fn_t)ndr_push_winreg_QueryMultipleValues2);
1169         
1170         if (!NT_STATUS_IS_OK(status)) {
1171                 return status;
1172         }
1173         
1174         if (DEBUGLEVEL >= 10)
1175                 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2, &r);
1176         
1177         if (NT_STATUS_IS_ERR(status)) {
1178                 return status;
1179         }
1180         
1181         /* Return variables */
1182         
1183         /* Return result */
1184         return werror_to_ntstatus(r.out.result);
1185 }
1186