r18560: * Add in the winreg and initshutdown IDL files
[tprouty/samba.git] / source / librpc / gen_ndr / srv_winreg.c
1 /*
2  * Unix SMB/CIFS implementation.
3  * server auto-generated by pidl. DO NOT MODIFY!
4  */
5
6 #include "includes.h"
7 #include "librpc/gen_ndr/srv_winreg.h"
8
9 static BOOL api_winreg_OpenHKCR(pipes_struct *p)
10 {
11         struct ndr_pull *pull;
12         struct ndr_push *push;
13         NTSTATUS status;
14         DATA_BLOB blob;
15         struct winreg_OpenHKCR r;
16         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKCR");
17         
18         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
19                 talloc_free(mem_ctx);
20                 return False;
21         }
22         
23         pull = ndr_pull_init_blob(&blob, mem_ctx);
24         if (pull == NULL)
25                 return False;
26         
27         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
28         status = ndr_pull_winreg_OpenHKCR(pull, NDR_IN, &r);
29         if (NT_STATUS_IS_ERR(status)) {
30                 talloc_free(mem_ctx);
31                 return False;
32         }
33         
34         r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
35         if (r.out.handle == NULL) {
36                 talloc_free(mem_ctx);
37                 return False;
38         }
39         
40         r.out.result = _winreg_OpenHKCR(p, r.in.system_name, r.in.access_mask, r.out.handle);
41         
42         push = ndr_push_init_ctx(mem_ctx);
43         if (push == NULL) {
44                 talloc_free(mem_ctx);
45                 return False;
46         }
47         
48         status = ndr_push_winreg_OpenHKCR(push, NDR_OUT, &r);
49         if (NT_STATUS_IS_ERR(status)) {
50                 talloc_free(mem_ctx);
51                 return False;
52         }
53         
54         blob = ndr_push_blob(push);
55         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
56                 talloc_free(mem_ctx);
57                 return False;
58         }
59         
60         talloc_free(mem_ctx);
61         
62         return True;
63 }
64
65 static BOOL api_winreg_OpenHKCU(pipes_struct *p)
66 {
67         struct ndr_pull *pull;
68         struct ndr_push *push;
69         NTSTATUS status;
70         DATA_BLOB blob;
71         struct winreg_OpenHKCU r;
72         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKCU");
73         
74         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
75                 talloc_free(mem_ctx);
76                 return False;
77         }
78         
79         pull = ndr_pull_init_blob(&blob, mem_ctx);
80         if (pull == NULL)
81                 return False;
82         
83         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
84         status = ndr_pull_winreg_OpenHKCU(pull, NDR_IN, &r);
85         if (NT_STATUS_IS_ERR(status)) {
86                 talloc_free(mem_ctx);
87                 return False;
88         }
89         
90         r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
91         if (r.out.handle == NULL) {
92                 talloc_free(mem_ctx);
93                 return False;
94         }
95         
96         r.out.result = _winreg_OpenHKCU(p, r.in.system_name, r.in.access_mask, r.out.handle);
97         
98         push = ndr_push_init_ctx(mem_ctx);
99         if (push == NULL) {
100                 talloc_free(mem_ctx);
101                 return False;
102         }
103         
104         status = ndr_push_winreg_OpenHKCU(push, NDR_OUT, &r);
105         if (NT_STATUS_IS_ERR(status)) {
106                 talloc_free(mem_ctx);
107                 return False;
108         }
109         
110         blob = ndr_push_blob(push);
111         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
112                 talloc_free(mem_ctx);
113                 return False;
114         }
115         
116         talloc_free(mem_ctx);
117         
118         return True;
119 }
120
121 static BOOL api_winreg_OpenHKLM(pipes_struct *p)
122 {
123         struct ndr_pull *pull;
124         struct ndr_push *push;
125         NTSTATUS status;
126         DATA_BLOB blob;
127         struct winreg_OpenHKLM r;
128         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKLM");
129         
130         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
131                 talloc_free(mem_ctx);
132                 return False;
133         }
134         
135         pull = ndr_pull_init_blob(&blob, mem_ctx);
136         if (pull == NULL)
137                 return False;
138         
139         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
140         status = ndr_pull_winreg_OpenHKLM(pull, NDR_IN, &r);
141         if (NT_STATUS_IS_ERR(status)) {
142                 talloc_free(mem_ctx);
143                 return False;
144         }
145         
146         r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
147         if (r.out.handle == NULL) {
148                 talloc_free(mem_ctx);
149                 return False;
150         }
151         
152         r.out.result = _winreg_OpenHKLM(p, r.in.system_name, r.in.access_mask, r.out.handle);
153         
154         push = ndr_push_init_ctx(mem_ctx);
155         if (push == NULL) {
156                 talloc_free(mem_ctx);
157                 return False;
158         }
159         
160         status = ndr_push_winreg_OpenHKLM(push, NDR_OUT, &r);
161         if (NT_STATUS_IS_ERR(status)) {
162                 talloc_free(mem_ctx);
163                 return False;
164         }
165         
166         blob = ndr_push_blob(push);
167         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
168                 talloc_free(mem_ctx);
169                 return False;
170         }
171         
172         talloc_free(mem_ctx);
173         
174         return True;
175 }
176
177 static BOOL api_winreg_OpenHKPD(pipes_struct *p)
178 {
179         struct ndr_pull *pull;
180         struct ndr_push *push;
181         NTSTATUS status;
182         DATA_BLOB blob;
183         struct winreg_OpenHKPD r;
184         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKPD");
185         
186         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
187                 talloc_free(mem_ctx);
188                 return False;
189         }
190         
191         pull = ndr_pull_init_blob(&blob, mem_ctx);
192         if (pull == NULL)
193                 return False;
194         
195         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
196         status = ndr_pull_winreg_OpenHKPD(pull, NDR_IN, &r);
197         if (NT_STATUS_IS_ERR(status)) {
198                 talloc_free(mem_ctx);
199                 return False;
200         }
201         
202         r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
203         if (r.out.handle == NULL) {
204                 talloc_free(mem_ctx);
205                 return False;
206         }
207         
208         r.out.result = _winreg_OpenHKPD(p, r.in.system_name, r.in.access_mask, r.out.handle);
209         
210         push = ndr_push_init_ctx(mem_ctx);
211         if (push == NULL) {
212                 talloc_free(mem_ctx);
213                 return False;
214         }
215         
216         status = ndr_push_winreg_OpenHKPD(push, NDR_OUT, &r);
217         if (NT_STATUS_IS_ERR(status)) {
218                 talloc_free(mem_ctx);
219                 return False;
220         }
221         
222         blob = ndr_push_blob(push);
223         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
224                 talloc_free(mem_ctx);
225                 return False;
226         }
227         
228         talloc_free(mem_ctx);
229         
230         return True;
231 }
232
233 static BOOL api_winreg_OpenHKU(pipes_struct *p)
234 {
235         struct ndr_pull *pull;
236         struct ndr_push *push;
237         NTSTATUS status;
238         DATA_BLOB blob;
239         struct winreg_OpenHKU r;
240         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKU");
241         
242         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
243                 talloc_free(mem_ctx);
244                 return False;
245         }
246         
247         pull = ndr_pull_init_blob(&blob, mem_ctx);
248         if (pull == NULL)
249                 return False;
250         
251         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
252         status = ndr_pull_winreg_OpenHKU(pull, NDR_IN, &r);
253         if (NT_STATUS_IS_ERR(status)) {
254                 talloc_free(mem_ctx);
255                 return False;
256         }
257         
258         r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
259         if (r.out.handle == NULL) {
260                 talloc_free(mem_ctx);
261                 return False;
262         }
263         
264         r.out.result = _winreg_OpenHKU(p, r.in.system_name, r.in.access_mask, r.out.handle);
265         
266         push = ndr_push_init_ctx(mem_ctx);
267         if (push == NULL) {
268                 talloc_free(mem_ctx);
269                 return False;
270         }
271         
272         status = ndr_push_winreg_OpenHKU(push, NDR_OUT, &r);
273         if (NT_STATUS_IS_ERR(status)) {
274                 talloc_free(mem_ctx);
275                 return False;
276         }
277         
278         blob = ndr_push_blob(push);
279         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
280                 talloc_free(mem_ctx);
281                 return False;
282         }
283         
284         talloc_free(mem_ctx);
285         
286         return True;
287 }
288
289 static BOOL api_winreg_CloseKey(pipes_struct *p)
290 {
291         struct ndr_pull *pull;
292         struct ndr_push *push;
293         NTSTATUS status;
294         DATA_BLOB blob;
295         struct winreg_CloseKey r;
296         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_CloseKey");
297         
298         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
299                 talloc_free(mem_ctx);
300                 return False;
301         }
302         
303         pull = ndr_pull_init_blob(&blob, mem_ctx);
304         if (pull == NULL)
305                 return False;
306         
307         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
308         status = ndr_pull_winreg_CloseKey(pull, NDR_IN, &r);
309         if (NT_STATUS_IS_ERR(status)) {
310                 talloc_free(mem_ctx);
311                 return False;
312         }
313         
314         r.out.handle = r.in.handle;
315         r.out.result = _winreg_CloseKey(p, r.in.handle);
316         
317         push = ndr_push_init_ctx(mem_ctx);
318         if (push == NULL) {
319                 talloc_free(mem_ctx);
320                 return False;
321         }
322         
323         status = ndr_push_winreg_CloseKey(push, NDR_OUT, &r);
324         if (NT_STATUS_IS_ERR(status)) {
325                 talloc_free(mem_ctx);
326                 return False;
327         }
328         
329         blob = ndr_push_blob(push);
330         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
331                 talloc_free(mem_ctx);
332                 return False;
333         }
334         
335         talloc_free(mem_ctx);
336         
337         return True;
338 }
339
340 static BOOL api_winreg_CreateKey(pipes_struct *p)
341 {
342         struct ndr_pull *pull;
343         struct ndr_push *push;
344         NTSTATUS status;
345         DATA_BLOB blob;
346         struct winreg_CreateKey r;
347         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_CreateKey");
348         
349         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
350                 talloc_free(mem_ctx);
351                 return False;
352         }
353         
354         pull = ndr_pull_init_blob(&blob, mem_ctx);
355         if (pull == NULL)
356                 return False;
357         
358         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
359         status = ndr_pull_winreg_CreateKey(pull, NDR_IN, &r);
360         if (NT_STATUS_IS_ERR(status)) {
361                 talloc_free(mem_ctx);
362                 return False;
363         }
364         
365         r.out.new_handle = talloc_size(mem_ctx, sizeof(*r.out.new_handle));
366         if (r.out.new_handle == NULL) {
367                 talloc_free(mem_ctx);
368                 return False;
369         }
370         
371         r.out.action_taken = r.in.action_taken;
372         r.out.result = _winreg_CreateKey(p, r.in.handle, r.in.name, r.in.keyclass, r.in.options, r.in.access_mask, r.in.secdesc, r.out.new_handle, r.in.action_taken);
373         
374         push = ndr_push_init_ctx(mem_ctx);
375         if (push == NULL) {
376                 talloc_free(mem_ctx);
377                 return False;
378         }
379         
380         status = ndr_push_winreg_CreateKey(push, NDR_OUT, &r);
381         if (NT_STATUS_IS_ERR(status)) {
382                 talloc_free(mem_ctx);
383                 return False;
384         }
385         
386         blob = ndr_push_blob(push);
387         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
388                 talloc_free(mem_ctx);
389                 return False;
390         }
391         
392         talloc_free(mem_ctx);
393         
394         return True;
395 }
396
397 static BOOL api_winreg_DeleteKey(pipes_struct *p)
398 {
399         struct ndr_pull *pull;
400         struct ndr_push *push;
401         NTSTATUS status;
402         DATA_BLOB blob;
403         struct winreg_DeleteKey r;
404         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_DeleteKey");
405         
406         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
407                 talloc_free(mem_ctx);
408                 return False;
409         }
410         
411         pull = ndr_pull_init_blob(&blob, mem_ctx);
412         if (pull == NULL)
413                 return False;
414         
415         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
416         status = ndr_pull_winreg_DeleteKey(pull, NDR_IN, &r);
417         if (NT_STATUS_IS_ERR(status)) {
418                 talloc_free(mem_ctx);
419                 return False;
420         }
421         
422         r.out.result = _winreg_DeleteKey(p, r.in.handle, r.in.key);
423         
424         push = ndr_push_init_ctx(mem_ctx);
425         if (push == NULL) {
426                 talloc_free(mem_ctx);
427                 return False;
428         }
429         
430         status = ndr_push_winreg_DeleteKey(push, NDR_OUT, &r);
431         if (NT_STATUS_IS_ERR(status)) {
432                 talloc_free(mem_ctx);
433                 return False;
434         }
435         
436         blob = ndr_push_blob(push);
437         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
438                 talloc_free(mem_ctx);
439                 return False;
440         }
441         
442         talloc_free(mem_ctx);
443         
444         return True;
445 }
446
447 static BOOL api_winreg_DeleteValue(pipes_struct *p)
448 {
449         struct ndr_pull *pull;
450         struct ndr_push *push;
451         NTSTATUS status;
452         DATA_BLOB blob;
453         struct winreg_DeleteValue r;
454         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_DeleteValue");
455         
456         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
457                 talloc_free(mem_ctx);
458                 return False;
459         }
460         
461         pull = ndr_pull_init_blob(&blob, mem_ctx);
462         if (pull == NULL)
463                 return False;
464         
465         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
466         status = ndr_pull_winreg_DeleteValue(pull, NDR_IN, &r);
467         if (NT_STATUS_IS_ERR(status)) {
468                 talloc_free(mem_ctx);
469                 return False;
470         }
471         
472         r.out.result = _winreg_DeleteValue(p, r.in.handle, r.in.value);
473         
474         push = ndr_push_init_ctx(mem_ctx);
475         if (push == NULL) {
476                 talloc_free(mem_ctx);
477                 return False;
478         }
479         
480         status = ndr_push_winreg_DeleteValue(push, NDR_OUT, &r);
481         if (NT_STATUS_IS_ERR(status)) {
482                 talloc_free(mem_ctx);
483                 return False;
484         }
485         
486         blob = ndr_push_blob(push);
487         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
488                 talloc_free(mem_ctx);
489                 return False;
490         }
491         
492         talloc_free(mem_ctx);
493         
494         return True;
495 }
496
497 static BOOL api_winreg_EnumKey(pipes_struct *p)
498 {
499         struct ndr_pull *pull;
500         struct ndr_push *push;
501         NTSTATUS status;
502         DATA_BLOB blob;
503         struct winreg_EnumKey r;
504         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_EnumKey");
505         
506         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
507                 talloc_free(mem_ctx);
508                 return False;
509         }
510         
511         pull = ndr_pull_init_blob(&blob, mem_ctx);
512         if (pull == NULL)
513                 return False;
514         
515         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
516         status = ndr_pull_winreg_EnumKey(pull, NDR_IN, &r);
517         if (NT_STATUS_IS_ERR(status)) {
518                 talloc_free(mem_ctx);
519                 return False;
520         }
521         
522         r.out.name = r.in.name;
523         r.out.keyclass = r.in.keyclass;
524         r.out.last_changed_time = r.in.last_changed_time;
525         r.out.result = _winreg_EnumKey(p, r.in.handle, r.in.enum_index, r.in.name, r.in.keyclass, r.in.last_changed_time);
526         
527         push = ndr_push_init_ctx(mem_ctx);
528         if (push == NULL) {
529                 talloc_free(mem_ctx);
530                 return False;
531         }
532         
533         status = ndr_push_winreg_EnumKey(push, NDR_OUT, &r);
534         if (NT_STATUS_IS_ERR(status)) {
535                 talloc_free(mem_ctx);
536                 return False;
537         }
538         
539         blob = ndr_push_blob(push);
540         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
541                 talloc_free(mem_ctx);
542                 return False;
543         }
544         
545         talloc_free(mem_ctx);
546         
547         return True;
548 }
549
550 static BOOL api_winreg_EnumValue(pipes_struct *p)
551 {
552         struct ndr_pull *pull;
553         struct ndr_push *push;
554         NTSTATUS status;
555         DATA_BLOB blob;
556         struct winreg_EnumValue r;
557         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_EnumValue");
558         
559         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
560                 talloc_free(mem_ctx);
561                 return False;
562         }
563         
564         pull = ndr_pull_init_blob(&blob, mem_ctx);
565         if (pull == NULL)
566                 return False;
567         
568         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
569         status = ndr_pull_winreg_EnumValue(pull, NDR_IN, &r);
570         if (NT_STATUS_IS_ERR(status)) {
571                 talloc_free(mem_ctx);
572                 return False;
573         }
574         
575         r.out.name = r.in.name;
576         r.out.type = r.in.type;
577         r.out.value = r.in.value;
578         r.out.size = r.in.size;
579         r.out.length = r.in.length;
580         r.out.result = _winreg_EnumValue(p, r.in.handle, r.in.enum_index, r.in.name, r.in.type, r.in.value, r.in.size, r.in.length);
581         
582         push = ndr_push_init_ctx(mem_ctx);
583         if (push == NULL) {
584                 talloc_free(mem_ctx);
585                 return False;
586         }
587         
588         status = ndr_push_winreg_EnumValue(push, NDR_OUT, &r);
589         if (NT_STATUS_IS_ERR(status)) {
590                 talloc_free(mem_ctx);
591                 return False;
592         }
593         
594         blob = ndr_push_blob(push);
595         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
596                 talloc_free(mem_ctx);
597                 return False;
598         }
599         
600         talloc_free(mem_ctx);
601         
602         return True;
603 }
604
605 static BOOL api_winreg_FlushKey(pipes_struct *p)
606 {
607         struct ndr_pull *pull;
608         struct ndr_push *push;
609         NTSTATUS status;
610         DATA_BLOB blob;
611         struct winreg_FlushKey r;
612         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_FlushKey");
613         
614         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
615                 talloc_free(mem_ctx);
616                 return False;
617         }
618         
619         pull = ndr_pull_init_blob(&blob, mem_ctx);
620         if (pull == NULL)
621                 return False;
622         
623         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
624         status = ndr_pull_winreg_FlushKey(pull, NDR_IN, &r);
625         if (NT_STATUS_IS_ERR(status)) {
626                 talloc_free(mem_ctx);
627                 return False;
628         }
629         
630         r.out.result = _winreg_FlushKey(p, r.in.handle);
631         
632         push = ndr_push_init_ctx(mem_ctx);
633         if (push == NULL) {
634                 talloc_free(mem_ctx);
635                 return False;
636         }
637         
638         status = ndr_push_winreg_FlushKey(push, NDR_OUT, &r);
639         if (NT_STATUS_IS_ERR(status)) {
640                 talloc_free(mem_ctx);
641                 return False;
642         }
643         
644         blob = ndr_push_blob(push);
645         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
646                 talloc_free(mem_ctx);
647                 return False;
648         }
649         
650         talloc_free(mem_ctx);
651         
652         return True;
653 }
654
655 static BOOL api_winreg_GetKeySecurity(pipes_struct *p)
656 {
657         struct ndr_pull *pull;
658         struct ndr_push *push;
659         NTSTATUS status;
660         DATA_BLOB blob;
661         struct winreg_GetKeySecurity r;
662         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_GetKeySecurity");
663         
664         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
665                 talloc_free(mem_ctx);
666                 return False;
667         }
668         
669         pull = ndr_pull_init_blob(&blob, mem_ctx);
670         if (pull == NULL)
671                 return False;
672         
673         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
674         status = ndr_pull_winreg_GetKeySecurity(pull, NDR_IN, &r);
675         if (NT_STATUS_IS_ERR(status)) {
676                 talloc_free(mem_ctx);
677                 return False;
678         }
679         
680         r.out.sd = r.in.sd;
681         r.out.result = _winreg_GetKeySecurity(p, r.in.handle, r.in.sec_info, r.in.sd);
682         
683         push = ndr_push_init_ctx(mem_ctx);
684         if (push == NULL) {
685                 talloc_free(mem_ctx);
686                 return False;
687         }
688         
689         status = ndr_push_winreg_GetKeySecurity(push, NDR_OUT, &r);
690         if (NT_STATUS_IS_ERR(status)) {
691                 talloc_free(mem_ctx);
692                 return False;
693         }
694         
695         blob = ndr_push_blob(push);
696         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
697                 talloc_free(mem_ctx);
698                 return False;
699         }
700         
701         talloc_free(mem_ctx);
702         
703         return True;
704 }
705
706 static BOOL api_winreg_LoadKey(pipes_struct *p)
707 {
708         struct ndr_pull *pull;
709         struct ndr_push *push;
710         NTSTATUS status;
711         DATA_BLOB blob;
712         struct winreg_LoadKey r;
713         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_LoadKey");
714         
715         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
716                 talloc_free(mem_ctx);
717                 return False;
718         }
719         
720         pull = ndr_pull_init_blob(&blob, mem_ctx);
721         if (pull == NULL)
722                 return False;
723         
724         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
725         status = ndr_pull_winreg_LoadKey(pull, NDR_IN, &r);
726         if (NT_STATUS_IS_ERR(status)) {
727                 talloc_free(mem_ctx);
728                 return False;
729         }
730         
731         r.out.result = _winreg_LoadKey(p, r.in.handle, r.in.keyname, r.in.filename);
732         
733         push = ndr_push_init_ctx(mem_ctx);
734         if (push == NULL) {
735                 talloc_free(mem_ctx);
736                 return False;
737         }
738         
739         status = ndr_push_winreg_LoadKey(push, NDR_OUT, &r);
740         if (NT_STATUS_IS_ERR(status)) {
741                 talloc_free(mem_ctx);
742                 return False;
743         }
744         
745         blob = ndr_push_blob(push);
746         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
747                 talloc_free(mem_ctx);
748                 return False;
749         }
750         
751         talloc_free(mem_ctx);
752         
753         return True;
754 }
755
756 static BOOL api_winreg_NotifyChangeKeyValue(pipes_struct *p)
757 {
758         struct ndr_pull *pull;
759         struct ndr_push *push;
760         NTSTATUS status;
761         DATA_BLOB blob;
762         struct winreg_NotifyChangeKeyValue r;
763         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_NotifyChangeKeyValue");
764         
765         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
766                 talloc_free(mem_ctx);
767                 return False;
768         }
769         
770         pull = ndr_pull_init_blob(&blob, mem_ctx);
771         if (pull == NULL)
772                 return False;
773         
774         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
775         status = ndr_pull_winreg_NotifyChangeKeyValue(pull, NDR_IN, &r);
776         if (NT_STATUS_IS_ERR(status)) {
777                 talloc_free(mem_ctx);
778                 return False;
779         }
780         
781         r.out.result = _winreg_NotifyChangeKeyValue(p, r.in.handle, r.in.watch_subtree, r.in.notify_filter, r.in.unknown, r.in.string1, r.in.string2, r.in.unknown2);
782         
783         push = ndr_push_init_ctx(mem_ctx);
784         if (push == NULL) {
785                 talloc_free(mem_ctx);
786                 return False;
787         }
788         
789         status = ndr_push_winreg_NotifyChangeKeyValue(push, NDR_OUT, &r);
790         if (NT_STATUS_IS_ERR(status)) {
791                 talloc_free(mem_ctx);
792                 return False;
793         }
794         
795         blob = ndr_push_blob(push);
796         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
797                 talloc_free(mem_ctx);
798                 return False;
799         }
800         
801         talloc_free(mem_ctx);
802         
803         return True;
804 }
805
806 static BOOL api_winreg_OpenKey(pipes_struct *p)
807 {
808         struct ndr_pull *pull;
809         struct ndr_push *push;
810         NTSTATUS status;
811         DATA_BLOB blob;
812         struct winreg_OpenKey r;
813         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenKey");
814         
815         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
816                 talloc_free(mem_ctx);
817                 return False;
818         }
819         
820         pull = ndr_pull_init_blob(&blob, mem_ctx);
821         if (pull == NULL)
822                 return False;
823         
824         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
825         status = ndr_pull_winreg_OpenKey(pull, NDR_IN, &r);
826         if (NT_STATUS_IS_ERR(status)) {
827                 talloc_free(mem_ctx);
828                 return False;
829         }
830         
831         r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
832         if (r.out.handle == NULL) {
833                 talloc_free(mem_ctx);
834                 return False;
835         }
836         
837         r.out.result = _winreg_OpenKey(p, r.in.parent_handle, r.in.keyname, r.in.unknown, r.in.access_mask, r.out.handle);
838         
839         push = ndr_push_init_ctx(mem_ctx);
840         if (push == NULL) {
841                 talloc_free(mem_ctx);
842                 return False;
843         }
844         
845         status = ndr_push_winreg_OpenKey(push, NDR_OUT, &r);
846         if (NT_STATUS_IS_ERR(status)) {
847                 talloc_free(mem_ctx);
848                 return False;
849         }
850         
851         blob = ndr_push_blob(push);
852         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
853                 talloc_free(mem_ctx);
854                 return False;
855         }
856         
857         talloc_free(mem_ctx);
858         
859         return True;
860 }
861
862 static BOOL api_winreg_QueryInfoKey(pipes_struct *p)
863 {
864         struct ndr_pull *pull;
865         struct ndr_push *push;
866         NTSTATUS status;
867         DATA_BLOB blob;
868         struct winreg_QueryInfoKey r;
869         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_QueryInfoKey");
870         
871         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
872                 talloc_free(mem_ctx);
873                 return False;
874         }
875         
876         pull = ndr_pull_init_blob(&blob, mem_ctx);
877         if (pull == NULL)
878                 return False;
879         
880         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
881         status = ndr_pull_winreg_QueryInfoKey(pull, NDR_IN, &r);
882         if (NT_STATUS_IS_ERR(status)) {
883                 talloc_free(mem_ctx);
884                 return False;
885         }
886         
887         r.out.class_out = talloc_size(mem_ctx, sizeof(*r.out.class_out));
888         if (r.out.class_out == NULL) {
889                 talloc_free(mem_ctx);
890                 return False;
891         }
892         
893         r.out.num_subkeys = talloc_size(mem_ctx, sizeof(*r.out.num_subkeys));
894         if (r.out.num_subkeys == NULL) {
895                 talloc_free(mem_ctx);
896                 return False;
897         }
898         
899         r.out.max_subkeylen = talloc_size(mem_ctx, sizeof(*r.out.max_subkeylen));
900         if (r.out.max_subkeylen == NULL) {
901                 talloc_free(mem_ctx);
902                 return False;
903         }
904         
905         r.out.max_subkeysize = talloc_size(mem_ctx, sizeof(*r.out.max_subkeysize));
906         if (r.out.max_subkeysize == NULL) {
907                 talloc_free(mem_ctx);
908                 return False;
909         }
910         
911         r.out.num_values = talloc_size(mem_ctx, sizeof(*r.out.num_values));
912         if (r.out.num_values == NULL) {
913                 talloc_free(mem_ctx);
914                 return False;
915         }
916         
917         r.out.max_valnamelen = talloc_size(mem_ctx, sizeof(*r.out.max_valnamelen));
918         if (r.out.max_valnamelen == NULL) {
919                 talloc_free(mem_ctx);
920                 return False;
921         }
922         
923         r.out.max_valbufsize = talloc_size(mem_ctx, sizeof(*r.out.max_valbufsize));
924         if (r.out.max_valbufsize == NULL) {
925                 talloc_free(mem_ctx);
926                 return False;
927         }
928         
929         r.out.secdescsize = talloc_size(mem_ctx, sizeof(*r.out.secdescsize));
930         if (r.out.secdescsize == NULL) {
931                 talloc_free(mem_ctx);
932                 return False;
933         }
934         
935         r.out.last_changed_time = talloc_size(mem_ctx, sizeof(*r.out.last_changed_time));
936         if (r.out.last_changed_time == NULL) {
937                 talloc_free(mem_ctx);
938                 return False;
939         }
940         
941         r.out.result = _winreg_QueryInfoKey(p, r.in.handle, r.in.class_in, r.out.class_out, r.out.num_subkeys, r.out.max_subkeylen, r.out.max_subkeysize, r.out.num_values, r.out.max_valnamelen, r.out.max_valbufsize, r.out.secdescsize, r.out.last_changed_time);
942         
943         push = ndr_push_init_ctx(mem_ctx);
944         if (push == NULL) {
945                 talloc_free(mem_ctx);
946                 return False;
947         }
948         
949         status = ndr_push_winreg_QueryInfoKey(push, NDR_OUT, &r);
950         if (NT_STATUS_IS_ERR(status)) {
951                 talloc_free(mem_ctx);
952                 return False;
953         }
954         
955         blob = ndr_push_blob(push);
956         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
957                 talloc_free(mem_ctx);
958                 return False;
959         }
960         
961         talloc_free(mem_ctx);
962         
963         return True;
964 }
965
966 static BOOL api_winreg_QueryValue(pipes_struct *p)
967 {
968         struct ndr_pull *pull;
969         struct ndr_push *push;
970         NTSTATUS status;
971         DATA_BLOB blob;
972         struct winreg_QueryValue r;
973         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_QueryValue");
974         
975         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
976                 talloc_free(mem_ctx);
977                 return False;
978         }
979         
980         pull = ndr_pull_init_blob(&blob, mem_ctx);
981         if (pull == NULL)
982                 return False;
983         
984         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
985         status = ndr_pull_winreg_QueryValue(pull, NDR_IN, &r);
986         if (NT_STATUS_IS_ERR(status)) {
987                 talloc_free(mem_ctx);
988                 return False;
989         }
990         
991         r.out.type = r.in.type;
992         r.out.data = r.in.data;
993         r.out.size = r.in.size;
994         r.out.length = r.in.length;
995         r.out.result = _winreg_QueryValue(p, r.in.handle, r.in.value_name, r.in.type, r.in.data, r.in.size, r.in.length);
996         
997         push = ndr_push_init_ctx(mem_ctx);
998         if (push == NULL) {
999                 talloc_free(mem_ctx);
1000                 return False;
1001         }
1002         
1003         status = ndr_push_winreg_QueryValue(push, NDR_OUT, &r);
1004         if (NT_STATUS_IS_ERR(status)) {
1005                 talloc_free(mem_ctx);
1006                 return False;
1007         }
1008         
1009         blob = ndr_push_blob(push);
1010         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1011                 talloc_free(mem_ctx);
1012                 return False;
1013         }
1014         
1015         talloc_free(mem_ctx);
1016         
1017         return True;
1018 }
1019
1020 static BOOL api_winreg_ReplaceKey(pipes_struct *p)
1021 {
1022         struct ndr_pull *pull;
1023         struct ndr_push *push;
1024         NTSTATUS status;
1025         DATA_BLOB blob;
1026         struct winreg_ReplaceKey r;
1027         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_ReplaceKey");
1028         
1029         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1030                 talloc_free(mem_ctx);
1031                 return False;
1032         }
1033         
1034         pull = ndr_pull_init_blob(&blob, mem_ctx);
1035         if (pull == NULL)
1036                 return False;
1037         
1038         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1039         status = ndr_pull_winreg_ReplaceKey(pull, NDR_IN, &r);
1040         if (NT_STATUS_IS_ERR(status)) {
1041                 talloc_free(mem_ctx);
1042                 return False;
1043         }
1044         
1045         r.out.result = _winreg_ReplaceKey(p);
1046         
1047         push = ndr_push_init_ctx(mem_ctx);
1048         if (push == NULL) {
1049                 talloc_free(mem_ctx);
1050                 return False;
1051         }
1052         
1053         status = ndr_push_winreg_ReplaceKey(push, NDR_OUT, &r);
1054         if (NT_STATUS_IS_ERR(status)) {
1055                 talloc_free(mem_ctx);
1056                 return False;
1057         }
1058         
1059         blob = ndr_push_blob(push);
1060         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1061                 talloc_free(mem_ctx);
1062                 return False;
1063         }
1064         
1065         talloc_free(mem_ctx);
1066         
1067         return True;
1068 }
1069
1070 static BOOL api_winreg_RestoreKey(pipes_struct *p)
1071 {
1072         struct ndr_pull *pull;
1073         struct ndr_push *push;
1074         NTSTATUS status;
1075         DATA_BLOB blob;
1076         struct winreg_RestoreKey r;
1077         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_RestoreKey");
1078         
1079         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1080                 talloc_free(mem_ctx);
1081                 return False;
1082         }
1083         
1084         pull = ndr_pull_init_blob(&blob, mem_ctx);
1085         if (pull == NULL)
1086                 return False;
1087         
1088         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1089         status = ndr_pull_winreg_RestoreKey(pull, NDR_IN, &r);
1090         if (NT_STATUS_IS_ERR(status)) {
1091                 talloc_free(mem_ctx);
1092                 return False;
1093         }
1094         
1095         r.out.result = _winreg_RestoreKey(p);
1096         
1097         push = ndr_push_init_ctx(mem_ctx);
1098         if (push == NULL) {
1099                 talloc_free(mem_ctx);
1100                 return False;
1101         }
1102         
1103         status = ndr_push_winreg_RestoreKey(push, NDR_OUT, &r);
1104         if (NT_STATUS_IS_ERR(status)) {
1105                 talloc_free(mem_ctx);
1106                 return False;
1107         }
1108         
1109         blob = ndr_push_blob(push);
1110         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1111                 talloc_free(mem_ctx);
1112                 return False;
1113         }
1114         
1115         talloc_free(mem_ctx);
1116         
1117         return True;
1118 }
1119
1120 static BOOL api_winreg_SaveKey(pipes_struct *p)
1121 {
1122         struct ndr_pull *pull;
1123         struct ndr_push *push;
1124         NTSTATUS status;
1125         DATA_BLOB blob;
1126         struct winreg_SaveKey r;
1127         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_SaveKey");
1128         
1129         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1130                 talloc_free(mem_ctx);
1131                 return False;
1132         }
1133         
1134         pull = ndr_pull_init_blob(&blob, mem_ctx);
1135         if (pull == NULL)
1136                 return False;
1137         
1138         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1139         status = ndr_pull_winreg_SaveKey(pull, NDR_IN, &r);
1140         if (NT_STATUS_IS_ERR(status)) {
1141                 talloc_free(mem_ctx);
1142                 return False;
1143         }
1144         
1145         r.out.result = _winreg_SaveKey(p);
1146         
1147         push = ndr_push_init_ctx(mem_ctx);
1148         if (push == NULL) {
1149                 talloc_free(mem_ctx);
1150                 return False;
1151         }
1152         
1153         status = ndr_push_winreg_SaveKey(push, NDR_OUT, &r);
1154         if (NT_STATUS_IS_ERR(status)) {
1155                 talloc_free(mem_ctx);
1156                 return False;
1157         }
1158         
1159         blob = ndr_push_blob(push);
1160         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1161                 talloc_free(mem_ctx);
1162                 return False;
1163         }
1164         
1165         talloc_free(mem_ctx);
1166         
1167         return True;
1168 }
1169
1170 static BOOL api_winreg_SetKeySecurity(pipes_struct *p)
1171 {
1172         struct ndr_pull *pull;
1173         struct ndr_push *push;
1174         NTSTATUS status;
1175         DATA_BLOB blob;
1176         struct winreg_SetKeySecurity r;
1177         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_SetKeySecurity");
1178         
1179         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1180                 talloc_free(mem_ctx);
1181                 return False;
1182         }
1183         
1184         pull = ndr_pull_init_blob(&blob, mem_ctx);
1185         if (pull == NULL)
1186                 return False;
1187         
1188         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1189         status = ndr_pull_winreg_SetKeySecurity(pull, NDR_IN, &r);
1190         if (NT_STATUS_IS_ERR(status)) {
1191                 talloc_free(mem_ctx);
1192                 return False;
1193         }
1194         
1195         r.out.sd = r.in.sd;
1196         r.out.result = _winreg_SetKeySecurity(p, r.in.handle, r.in.access_mask, r.in.sd);
1197         
1198         push = ndr_push_init_ctx(mem_ctx);
1199         if (push == NULL) {
1200                 talloc_free(mem_ctx);
1201                 return False;
1202         }
1203         
1204         status = ndr_push_winreg_SetKeySecurity(push, NDR_OUT, &r);
1205         if (NT_STATUS_IS_ERR(status)) {
1206                 talloc_free(mem_ctx);
1207                 return False;
1208         }
1209         
1210         blob = ndr_push_blob(push);
1211         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1212                 talloc_free(mem_ctx);
1213                 return False;
1214         }
1215         
1216         talloc_free(mem_ctx);
1217         
1218         return True;
1219 }
1220
1221 static BOOL api_winreg_SetValue(pipes_struct *p)
1222 {
1223         struct ndr_pull *pull;
1224         struct ndr_push *push;
1225         NTSTATUS status;
1226         DATA_BLOB blob;
1227         struct winreg_SetValue r;
1228         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_SetValue");
1229         
1230         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1231                 talloc_free(mem_ctx);
1232                 return False;
1233         }
1234         
1235         pull = ndr_pull_init_blob(&blob, mem_ctx);
1236         if (pull == NULL)
1237                 return False;
1238         
1239         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1240         status = ndr_pull_winreg_SetValue(pull, NDR_IN, &r);
1241         if (NT_STATUS_IS_ERR(status)) {
1242                 talloc_free(mem_ctx);
1243                 return False;
1244         }
1245         
1246         r.out.result = _winreg_SetValue(p, r.in.handle, r.in.name, r.in.type, r.in.data, r.in.size);
1247         
1248         push = ndr_push_init_ctx(mem_ctx);
1249         if (push == NULL) {
1250                 talloc_free(mem_ctx);
1251                 return False;
1252         }
1253         
1254         status = ndr_push_winreg_SetValue(push, NDR_OUT, &r);
1255         if (NT_STATUS_IS_ERR(status)) {
1256                 talloc_free(mem_ctx);
1257                 return False;
1258         }
1259         
1260         blob = ndr_push_blob(push);
1261         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1262                 talloc_free(mem_ctx);
1263                 return False;
1264         }
1265         
1266         talloc_free(mem_ctx);
1267         
1268         return True;
1269 }
1270
1271 static BOOL api_winreg_UnLoadKey(pipes_struct *p)
1272 {
1273         struct ndr_pull *pull;
1274         struct ndr_push *push;
1275         NTSTATUS status;
1276         DATA_BLOB blob;
1277         struct winreg_UnLoadKey r;
1278         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_UnLoadKey");
1279         
1280         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1281                 talloc_free(mem_ctx);
1282                 return False;
1283         }
1284         
1285         pull = ndr_pull_init_blob(&blob, mem_ctx);
1286         if (pull == NULL)
1287                 return False;
1288         
1289         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1290         status = ndr_pull_winreg_UnLoadKey(pull, NDR_IN, &r);
1291         if (NT_STATUS_IS_ERR(status)) {
1292                 talloc_free(mem_ctx);
1293                 return False;
1294         }
1295         
1296         r.out.result = _winreg_UnLoadKey(p);
1297         
1298         push = ndr_push_init_ctx(mem_ctx);
1299         if (push == NULL) {
1300                 talloc_free(mem_ctx);
1301                 return False;
1302         }
1303         
1304         status = ndr_push_winreg_UnLoadKey(push, NDR_OUT, &r);
1305         if (NT_STATUS_IS_ERR(status)) {
1306                 talloc_free(mem_ctx);
1307                 return False;
1308         }
1309         
1310         blob = ndr_push_blob(push);
1311         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1312                 talloc_free(mem_ctx);
1313                 return False;
1314         }
1315         
1316         talloc_free(mem_ctx);
1317         
1318         return True;
1319 }
1320
1321 static BOOL api_winreg_InitiateSystemShutdown(pipes_struct *p)
1322 {
1323         struct ndr_pull *pull;
1324         struct ndr_push *push;
1325         NTSTATUS status;
1326         DATA_BLOB blob;
1327         struct winreg_InitiateSystemShutdown r;
1328         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_InitiateSystemShutdown");
1329         
1330         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1331                 talloc_free(mem_ctx);
1332                 return False;
1333         }
1334         
1335         pull = ndr_pull_init_blob(&blob, mem_ctx);
1336         if (pull == NULL)
1337                 return False;
1338         
1339         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1340         status = ndr_pull_winreg_InitiateSystemShutdown(pull, NDR_IN, &r);
1341         if (NT_STATUS_IS_ERR(status)) {
1342                 talloc_free(mem_ctx);
1343                 return False;
1344         }
1345         
1346         r.out.result = _winreg_InitiateSystemShutdown(p, r.in.hostname, r.in.message, r.in.timeout, r.in.force_apps, r.in.reboot);
1347         
1348         push = ndr_push_init_ctx(mem_ctx);
1349         if (push == NULL) {
1350                 talloc_free(mem_ctx);
1351                 return False;
1352         }
1353         
1354         status = ndr_push_winreg_InitiateSystemShutdown(push, NDR_OUT, &r);
1355         if (NT_STATUS_IS_ERR(status)) {
1356                 talloc_free(mem_ctx);
1357                 return False;
1358         }
1359         
1360         blob = ndr_push_blob(push);
1361         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1362                 talloc_free(mem_ctx);
1363                 return False;
1364         }
1365         
1366         talloc_free(mem_ctx);
1367         
1368         return True;
1369 }
1370
1371 static BOOL api_winreg_AbortSystemShutdown(pipes_struct *p)
1372 {
1373         struct ndr_pull *pull;
1374         struct ndr_push *push;
1375         NTSTATUS status;
1376         DATA_BLOB blob;
1377         struct winreg_AbortSystemShutdown r;
1378         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_AbortSystemShutdown");
1379         
1380         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1381                 talloc_free(mem_ctx);
1382                 return False;
1383         }
1384         
1385         pull = ndr_pull_init_blob(&blob, mem_ctx);
1386         if (pull == NULL)
1387                 return False;
1388         
1389         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1390         status = ndr_pull_winreg_AbortSystemShutdown(pull, NDR_IN, &r);
1391         if (NT_STATUS_IS_ERR(status)) {
1392                 talloc_free(mem_ctx);
1393                 return False;
1394         }
1395         
1396         r.out.result = _winreg_AbortSystemShutdown(p, r.in.server);
1397         
1398         push = ndr_push_init_ctx(mem_ctx);
1399         if (push == NULL) {
1400                 talloc_free(mem_ctx);
1401                 return False;
1402         }
1403         
1404         status = ndr_push_winreg_AbortSystemShutdown(push, NDR_OUT, &r);
1405         if (NT_STATUS_IS_ERR(status)) {
1406                 talloc_free(mem_ctx);
1407                 return False;
1408         }
1409         
1410         blob = ndr_push_blob(push);
1411         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1412                 talloc_free(mem_ctx);
1413                 return False;
1414         }
1415         
1416         talloc_free(mem_ctx);
1417         
1418         return True;
1419 }
1420
1421 static BOOL api_winreg_GetVersion(pipes_struct *p)
1422 {
1423         struct ndr_pull *pull;
1424         struct ndr_push *push;
1425         NTSTATUS status;
1426         DATA_BLOB blob;
1427         struct winreg_GetVersion r;
1428         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_GetVersion");
1429         
1430         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1431                 talloc_free(mem_ctx);
1432                 return False;
1433         }
1434         
1435         pull = ndr_pull_init_blob(&blob, mem_ctx);
1436         if (pull == NULL)
1437                 return False;
1438         
1439         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1440         status = ndr_pull_winreg_GetVersion(pull, NDR_IN, &r);
1441         if (NT_STATUS_IS_ERR(status)) {
1442                 talloc_free(mem_ctx);
1443                 return False;
1444         }
1445         
1446         r.out.version = talloc_size(mem_ctx, sizeof(*r.out.version));
1447         if (r.out.version == NULL) {
1448                 talloc_free(mem_ctx);
1449                 return False;
1450         }
1451         
1452         r.out.result = _winreg_GetVersion(p, r.in.handle, r.out.version);
1453         
1454         push = ndr_push_init_ctx(mem_ctx);
1455         if (push == NULL) {
1456                 talloc_free(mem_ctx);
1457                 return False;
1458         }
1459         
1460         status = ndr_push_winreg_GetVersion(push, NDR_OUT, &r);
1461         if (NT_STATUS_IS_ERR(status)) {
1462                 talloc_free(mem_ctx);
1463                 return False;
1464         }
1465         
1466         blob = ndr_push_blob(push);
1467         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1468                 talloc_free(mem_ctx);
1469                 return False;
1470         }
1471         
1472         talloc_free(mem_ctx);
1473         
1474         return True;
1475 }
1476
1477 static BOOL api_winreg_OpenHKCC(pipes_struct *p)
1478 {
1479         struct ndr_pull *pull;
1480         struct ndr_push *push;
1481         NTSTATUS status;
1482         DATA_BLOB blob;
1483         struct winreg_OpenHKCC r;
1484         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKCC");
1485         
1486         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1487                 talloc_free(mem_ctx);
1488                 return False;
1489         }
1490         
1491         pull = ndr_pull_init_blob(&blob, mem_ctx);
1492         if (pull == NULL)
1493                 return False;
1494         
1495         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1496         status = ndr_pull_winreg_OpenHKCC(pull, NDR_IN, &r);
1497         if (NT_STATUS_IS_ERR(status)) {
1498                 talloc_free(mem_ctx);
1499                 return False;
1500         }
1501         
1502         r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
1503         if (r.out.handle == NULL) {
1504                 talloc_free(mem_ctx);
1505                 return False;
1506         }
1507         
1508         r.out.result = _winreg_OpenHKCC(p, r.in.system_name, r.in.access_mask, r.out.handle);
1509         
1510         push = ndr_push_init_ctx(mem_ctx);
1511         if (push == NULL) {
1512                 talloc_free(mem_ctx);
1513                 return False;
1514         }
1515         
1516         status = ndr_push_winreg_OpenHKCC(push, NDR_OUT, &r);
1517         if (NT_STATUS_IS_ERR(status)) {
1518                 talloc_free(mem_ctx);
1519                 return False;
1520         }
1521         
1522         blob = ndr_push_blob(push);
1523         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1524                 talloc_free(mem_ctx);
1525                 return False;
1526         }
1527         
1528         talloc_free(mem_ctx);
1529         
1530         return True;
1531 }
1532
1533 static BOOL api_winreg_OpenHKDD(pipes_struct *p)
1534 {
1535         struct ndr_pull *pull;
1536         struct ndr_push *push;
1537         NTSTATUS status;
1538         DATA_BLOB blob;
1539         struct winreg_OpenHKDD r;
1540         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKDD");
1541         
1542         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1543                 talloc_free(mem_ctx);
1544                 return False;
1545         }
1546         
1547         pull = ndr_pull_init_blob(&blob, mem_ctx);
1548         if (pull == NULL)
1549                 return False;
1550         
1551         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1552         status = ndr_pull_winreg_OpenHKDD(pull, NDR_IN, &r);
1553         if (NT_STATUS_IS_ERR(status)) {
1554                 talloc_free(mem_ctx);
1555                 return False;
1556         }
1557         
1558         r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
1559         if (r.out.handle == NULL) {
1560                 talloc_free(mem_ctx);
1561                 return False;
1562         }
1563         
1564         r.out.result = _winreg_OpenHKDD(p, r.in.system_name, r.in.access_mask, r.out.handle);
1565         
1566         push = ndr_push_init_ctx(mem_ctx);
1567         if (push == NULL) {
1568                 talloc_free(mem_ctx);
1569                 return False;
1570         }
1571         
1572         status = ndr_push_winreg_OpenHKDD(push, NDR_OUT, &r);
1573         if (NT_STATUS_IS_ERR(status)) {
1574                 talloc_free(mem_ctx);
1575                 return False;
1576         }
1577         
1578         blob = ndr_push_blob(push);
1579         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1580                 talloc_free(mem_ctx);
1581                 return False;
1582         }
1583         
1584         talloc_free(mem_ctx);
1585         
1586         return True;
1587 }
1588
1589 static BOOL api_winreg_QueryMultipleValues(pipes_struct *p)
1590 {
1591         struct ndr_pull *pull;
1592         struct ndr_push *push;
1593         NTSTATUS status;
1594         DATA_BLOB blob;
1595         struct winreg_QueryMultipleValues r;
1596         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_QueryMultipleValues");
1597         
1598         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1599                 talloc_free(mem_ctx);
1600                 return False;
1601         }
1602         
1603         pull = ndr_pull_init_blob(&blob, mem_ctx);
1604         if (pull == NULL)
1605                 return False;
1606         
1607         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1608         status = ndr_pull_winreg_QueryMultipleValues(pull, NDR_IN, &r);
1609         if (NT_STATUS_IS_ERR(status)) {
1610                 talloc_free(mem_ctx);
1611                 return False;
1612         }
1613         
1614         r.out.values = r.in.values;
1615         r.out.buffer = r.in.buffer;
1616         r.out.buffer_size = r.in.buffer_size;
1617         r.out.result = _winreg_QueryMultipleValues(p, r.in.key_handle, r.in.values, r.in.num_values, r.in.buffer, r.in.buffer_size);
1618         
1619         push = ndr_push_init_ctx(mem_ctx);
1620         if (push == NULL) {
1621                 talloc_free(mem_ctx);
1622                 return False;
1623         }
1624         
1625         status = ndr_push_winreg_QueryMultipleValues(push, NDR_OUT, &r);
1626         if (NT_STATUS_IS_ERR(status)) {
1627                 talloc_free(mem_ctx);
1628                 return False;
1629         }
1630         
1631         blob = ndr_push_blob(push);
1632         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1633                 talloc_free(mem_ctx);
1634                 return False;
1635         }
1636         
1637         talloc_free(mem_ctx);
1638         
1639         return True;
1640 }
1641
1642 static BOOL api_winreg_InitiateSystemShutdownEx(pipes_struct *p)
1643 {
1644         struct ndr_pull *pull;
1645         struct ndr_push *push;
1646         NTSTATUS status;
1647         DATA_BLOB blob;
1648         struct winreg_InitiateSystemShutdownEx r;
1649         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_InitiateSystemShutdownEx");
1650         
1651         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1652                 talloc_free(mem_ctx);
1653                 return False;
1654         }
1655         
1656         pull = ndr_pull_init_blob(&blob, mem_ctx);
1657         if (pull == NULL)
1658                 return False;
1659         
1660         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1661         status = ndr_pull_winreg_InitiateSystemShutdownEx(pull, NDR_IN, &r);
1662         if (NT_STATUS_IS_ERR(status)) {
1663                 talloc_free(mem_ctx);
1664                 return False;
1665         }
1666         
1667         r.out.result = _winreg_InitiateSystemShutdownEx(p, r.in.hostname, r.in.message, r.in.timeout, r.in.force_apps, r.in.reboot, r.in.reason);
1668         
1669         push = ndr_push_init_ctx(mem_ctx);
1670         if (push == NULL) {
1671                 talloc_free(mem_ctx);
1672                 return False;
1673         }
1674         
1675         status = ndr_push_winreg_InitiateSystemShutdownEx(push, NDR_OUT, &r);
1676         if (NT_STATUS_IS_ERR(status)) {
1677                 talloc_free(mem_ctx);
1678                 return False;
1679         }
1680         
1681         blob = ndr_push_blob(push);
1682         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1683                 talloc_free(mem_ctx);
1684                 return False;
1685         }
1686         
1687         talloc_free(mem_ctx);
1688         
1689         return True;
1690 }
1691
1692 static BOOL api_winreg_SaveKeyEx(pipes_struct *p)
1693 {
1694         struct ndr_pull *pull;
1695         struct ndr_push *push;
1696         NTSTATUS status;
1697         DATA_BLOB blob;
1698         struct winreg_SaveKeyEx r;
1699         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_SaveKeyEx");
1700         
1701         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1702                 talloc_free(mem_ctx);
1703                 return False;
1704         }
1705         
1706         pull = ndr_pull_init_blob(&blob, mem_ctx);
1707         if (pull == NULL)
1708                 return False;
1709         
1710         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1711         status = ndr_pull_winreg_SaveKeyEx(pull, NDR_IN, &r);
1712         if (NT_STATUS_IS_ERR(status)) {
1713                 talloc_free(mem_ctx);
1714                 return False;
1715         }
1716         
1717         r.out.result = _winreg_SaveKeyEx(p);
1718         
1719         push = ndr_push_init_ctx(mem_ctx);
1720         if (push == NULL) {
1721                 talloc_free(mem_ctx);
1722                 return False;
1723         }
1724         
1725         status = ndr_push_winreg_SaveKeyEx(push, NDR_OUT, &r);
1726         if (NT_STATUS_IS_ERR(status)) {
1727                 talloc_free(mem_ctx);
1728                 return False;
1729         }
1730         
1731         blob = ndr_push_blob(push);
1732         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1733                 talloc_free(mem_ctx);
1734                 return False;
1735         }
1736         
1737         talloc_free(mem_ctx);
1738         
1739         return True;
1740 }
1741
1742 static BOOL api_winreg_OpenHKPT(pipes_struct *p)
1743 {
1744         struct ndr_pull *pull;
1745         struct ndr_push *push;
1746         NTSTATUS status;
1747         DATA_BLOB blob;
1748         struct winreg_OpenHKPT r;
1749         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKPT");
1750         
1751         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1752                 talloc_free(mem_ctx);
1753                 return False;
1754         }
1755         
1756         pull = ndr_pull_init_blob(&blob, mem_ctx);
1757         if (pull == NULL)
1758                 return False;
1759         
1760         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1761         status = ndr_pull_winreg_OpenHKPT(pull, NDR_IN, &r);
1762         if (NT_STATUS_IS_ERR(status)) {
1763                 talloc_free(mem_ctx);
1764                 return False;
1765         }
1766         
1767         r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
1768         if (r.out.handle == NULL) {
1769                 talloc_free(mem_ctx);
1770                 return False;
1771         }
1772         
1773         r.out.result = _winreg_OpenHKPT(p, r.in.system_name, r.in.access_mask, r.out.handle);
1774         
1775         push = ndr_push_init_ctx(mem_ctx);
1776         if (push == NULL) {
1777                 talloc_free(mem_ctx);
1778                 return False;
1779         }
1780         
1781         status = ndr_push_winreg_OpenHKPT(push, NDR_OUT, &r);
1782         if (NT_STATUS_IS_ERR(status)) {
1783                 talloc_free(mem_ctx);
1784                 return False;
1785         }
1786         
1787         blob = ndr_push_blob(push);
1788         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1789                 talloc_free(mem_ctx);
1790                 return False;
1791         }
1792         
1793         talloc_free(mem_ctx);
1794         
1795         return True;
1796 }
1797
1798 static BOOL api_winreg_OpenHKPN(pipes_struct *p)
1799 {
1800         struct ndr_pull *pull;
1801         struct ndr_push *push;
1802         NTSTATUS status;
1803         DATA_BLOB blob;
1804         struct winreg_OpenHKPN r;
1805         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_OpenHKPN");
1806         
1807         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1808                 talloc_free(mem_ctx);
1809                 return False;
1810         }
1811         
1812         pull = ndr_pull_init_blob(&blob, mem_ctx);
1813         if (pull == NULL)
1814                 return False;
1815         
1816         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1817         status = ndr_pull_winreg_OpenHKPN(pull, NDR_IN, &r);
1818         if (NT_STATUS_IS_ERR(status)) {
1819                 talloc_free(mem_ctx);
1820                 return False;
1821         }
1822         
1823         r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
1824         if (r.out.handle == NULL) {
1825                 talloc_free(mem_ctx);
1826                 return False;
1827         }
1828         
1829         r.out.result = _winreg_OpenHKPN(p, r.in.system_name, r.in.access_mask, r.out.handle);
1830         
1831         push = ndr_push_init_ctx(mem_ctx);
1832         if (push == NULL) {
1833                 talloc_free(mem_ctx);
1834                 return False;
1835         }
1836         
1837         status = ndr_push_winreg_OpenHKPN(push, NDR_OUT, &r);
1838         if (NT_STATUS_IS_ERR(status)) {
1839                 talloc_free(mem_ctx);
1840                 return False;
1841         }
1842         
1843         blob = ndr_push_blob(push);
1844         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1845                 talloc_free(mem_ctx);
1846                 return False;
1847         }
1848         
1849         talloc_free(mem_ctx);
1850         
1851         return True;
1852 }
1853
1854 static BOOL api_winreg_QueryMultipleValues2(pipes_struct *p)
1855 {
1856         struct ndr_pull *pull;
1857         struct ndr_push *push;
1858         NTSTATUS status;
1859         DATA_BLOB blob;
1860         struct winreg_QueryMultipleValues2 r;
1861         TALLOC_CTX *mem_ctx = talloc_init("api_winreg_QueryMultipleValues2");
1862         
1863         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1864                 talloc_free(mem_ctx);
1865                 return False;
1866         }
1867         
1868         pull = ndr_pull_init_blob(&blob, mem_ctx);
1869         if (pull == NULL)
1870                 return False;
1871         
1872         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1873         status = ndr_pull_winreg_QueryMultipleValues2(pull, NDR_IN, &r);
1874         if (NT_STATUS_IS_ERR(status)) {
1875                 talloc_free(mem_ctx);
1876                 return False;
1877         }
1878         
1879         r.out.result = _winreg_QueryMultipleValues2(p);
1880         
1881         push = ndr_push_init_ctx(mem_ctx);
1882         if (push == NULL) {
1883                 talloc_free(mem_ctx);
1884                 return False;
1885         }
1886         
1887         status = ndr_push_winreg_QueryMultipleValues2(push, NDR_OUT, &r);
1888         if (NT_STATUS_IS_ERR(status)) {
1889                 talloc_free(mem_ctx);
1890                 return False;
1891         }
1892         
1893         blob = ndr_push_blob(push);
1894         if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
1895                 talloc_free(mem_ctx);
1896                 return False;
1897         }
1898         
1899         talloc_free(mem_ctx);
1900         
1901         return True;
1902 }
1903
1904
1905 /* Tables */
1906 static struct api_struct api_winreg_cmds[] = 
1907 {
1908         {"WINREG_OPENHKCR", DCERPC_WINREG_OPENHKCR, api_winreg_OpenHKCR},
1909         {"WINREG_OPENHKCU", DCERPC_WINREG_OPENHKCU, api_winreg_OpenHKCU},
1910         {"WINREG_OPENHKLM", DCERPC_WINREG_OPENHKLM, api_winreg_OpenHKLM},
1911         {"WINREG_OPENHKPD", DCERPC_WINREG_OPENHKPD, api_winreg_OpenHKPD},
1912         {"WINREG_OPENHKU", DCERPC_WINREG_OPENHKU, api_winreg_OpenHKU},
1913         {"WINREG_CLOSEKEY", DCERPC_WINREG_CLOSEKEY, api_winreg_CloseKey},
1914         {"WINREG_CREATEKEY", DCERPC_WINREG_CREATEKEY, api_winreg_CreateKey},
1915         {"WINREG_DELETEKEY", DCERPC_WINREG_DELETEKEY, api_winreg_DeleteKey},
1916         {"WINREG_DELETEVALUE", DCERPC_WINREG_DELETEVALUE, api_winreg_DeleteValue},
1917         {"WINREG_ENUMKEY", DCERPC_WINREG_ENUMKEY, api_winreg_EnumKey},
1918         {"WINREG_ENUMVALUE", DCERPC_WINREG_ENUMVALUE, api_winreg_EnumValue},
1919         {"WINREG_FLUSHKEY", DCERPC_WINREG_FLUSHKEY, api_winreg_FlushKey},
1920         {"WINREG_GETKEYSECURITY", DCERPC_WINREG_GETKEYSECURITY, api_winreg_GetKeySecurity},
1921         {"WINREG_LOADKEY", DCERPC_WINREG_LOADKEY, api_winreg_LoadKey},
1922         {"WINREG_NOTIFYCHANGEKEYVALUE", DCERPC_WINREG_NOTIFYCHANGEKEYVALUE, api_winreg_NotifyChangeKeyValue},
1923         {"WINREG_OPENKEY", DCERPC_WINREG_OPENKEY, api_winreg_OpenKey},
1924         {"WINREG_QUERYINFOKEY", DCERPC_WINREG_QUERYINFOKEY, api_winreg_QueryInfoKey},
1925         {"WINREG_QUERYVALUE", DCERPC_WINREG_QUERYVALUE, api_winreg_QueryValue},
1926         {"WINREG_REPLACEKEY", DCERPC_WINREG_REPLACEKEY, api_winreg_ReplaceKey},
1927         {"WINREG_RESTOREKEY", DCERPC_WINREG_RESTOREKEY, api_winreg_RestoreKey},
1928         {"WINREG_SAVEKEY", DCERPC_WINREG_SAVEKEY, api_winreg_SaveKey},
1929         {"WINREG_SETKEYSECURITY", DCERPC_WINREG_SETKEYSECURITY, api_winreg_SetKeySecurity},
1930         {"WINREG_SETVALUE", DCERPC_WINREG_SETVALUE, api_winreg_SetValue},
1931         {"WINREG_UNLOADKEY", DCERPC_WINREG_UNLOADKEY, api_winreg_UnLoadKey},
1932         {"WINREG_INITIATESYSTEMSHUTDOWN", DCERPC_WINREG_INITIATESYSTEMSHUTDOWN, api_winreg_InitiateSystemShutdown},
1933         {"WINREG_ABORTSYSTEMSHUTDOWN", DCERPC_WINREG_ABORTSYSTEMSHUTDOWN, api_winreg_AbortSystemShutdown},
1934         {"WINREG_GETVERSION", DCERPC_WINREG_GETVERSION, api_winreg_GetVersion},
1935         {"WINREG_OPENHKCC", DCERPC_WINREG_OPENHKCC, api_winreg_OpenHKCC},
1936         {"WINREG_OPENHKDD", DCERPC_WINREG_OPENHKDD, api_winreg_OpenHKDD},
1937         {"WINREG_QUERYMULTIPLEVALUES", DCERPC_WINREG_QUERYMULTIPLEVALUES, api_winreg_QueryMultipleValues},
1938         {"WINREG_INITIATESYSTEMSHUTDOWNEX", DCERPC_WINREG_INITIATESYSTEMSHUTDOWNEX, api_winreg_InitiateSystemShutdownEx},
1939         {"WINREG_SAVEKEYEX", DCERPC_WINREG_SAVEKEYEX, api_winreg_SaveKeyEx},
1940         {"WINREG_OPENHKPT", DCERPC_WINREG_OPENHKPT, api_winreg_OpenHKPT},
1941         {"WINREG_OPENHKPN", DCERPC_WINREG_OPENHKPN, api_winreg_OpenHKPN},
1942         {"WINREG_QUERYMULTIPLEVALUES2", DCERPC_WINREG_QUERYMULTIPLEVALUES2, api_winreg_QueryMultipleValues2},
1943 };
1944
1945 void winreg_get_pipe_fns(struct api_struct **fns, int *n_fns)
1946 {
1947         *fns = api_winreg_cmds;
1948         *n_fns = sizeof(api_winreg_cmds) / sizeof(struct api_struct);
1949 }
1950
1951 NTSTATUS rpc_winreg_init(void)
1952 {
1953         return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "winreg", "winreg", api_winreg_cmds, sizeof(api_winreg_cmds) / sizeof(struct api_struct));
1954 }