Merge branch 'master' of ssh://git.samba.org/data/git/samba
[ira/wip.git] / source3 / librpc / gen_ndr / cli_ntsvcs.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_ntsvcs.h"
8
9 NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli,
10                                TALLOC_CTX *mem_ctx,
11                                WERROR *werror)
12 {
13         struct PNP_Disconnect r;
14         NTSTATUS status;
15
16         /* In parameters */
17
18         if (DEBUGLEVEL >= 10) {
19                 NDR_PRINT_IN_DEBUG(PNP_Disconnect, &r);
20         }
21
22         status = cli_do_rpc_ndr(cli,
23                                 mem_ctx,
24                                 &ndr_table_ntsvcs,
25                                 NDR_PNP_DISCONNECT,
26                                 &r);
27
28         if (!NT_STATUS_IS_OK(status)) {
29                 return status;
30         }
31
32         if (DEBUGLEVEL >= 10) {
33                 NDR_PRINT_OUT_DEBUG(PNP_Disconnect, &r);
34         }
35
36         if (NT_STATUS_IS_ERR(status)) {
37                 return status;
38         }
39
40         /* Return variables */
41
42         /* Return result */
43         if (werror) {
44                 *werror = r.out.result;
45         }
46
47         return werror_to_ntstatus(r.out.result);
48 }
49
50 NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli,
51                             TALLOC_CTX *mem_ctx,
52                             WERROR *werror)
53 {
54         struct PNP_Connect r;
55         NTSTATUS status;
56
57         /* In parameters */
58
59         if (DEBUGLEVEL >= 10) {
60                 NDR_PRINT_IN_DEBUG(PNP_Connect, &r);
61         }
62
63         status = cli_do_rpc_ndr(cli,
64                                 mem_ctx,
65                                 &ndr_table_ntsvcs,
66                                 NDR_PNP_CONNECT,
67                                 &r);
68
69         if (!NT_STATUS_IS_OK(status)) {
70                 return status;
71         }
72
73         if (DEBUGLEVEL >= 10) {
74                 NDR_PRINT_OUT_DEBUG(PNP_Connect, &r);
75         }
76
77         if (NT_STATUS_IS_ERR(status)) {
78                 return status;
79         }
80
81         /* Return variables */
82
83         /* Return result */
84         if (werror) {
85                 *werror = r.out.result;
86         }
87
88         return werror_to_ntstatus(r.out.result);
89 }
90
91 NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli,
92                                TALLOC_CTX *mem_ctx,
93                                uint16_t *version /* [out] [ref] */,
94                                WERROR *werror)
95 {
96         struct PNP_GetVersion r;
97         NTSTATUS status;
98
99         /* In parameters */
100
101         if (DEBUGLEVEL >= 10) {
102                 NDR_PRINT_IN_DEBUG(PNP_GetVersion, &r);
103         }
104
105         status = cli_do_rpc_ndr(cli,
106                                 mem_ctx,
107                                 &ndr_table_ntsvcs,
108                                 NDR_PNP_GETVERSION,
109                                 &r);
110
111         if (!NT_STATUS_IS_OK(status)) {
112                 return status;
113         }
114
115         if (DEBUGLEVEL >= 10) {
116                 NDR_PRINT_OUT_DEBUG(PNP_GetVersion, &r);
117         }
118
119         if (NT_STATUS_IS_ERR(status)) {
120                 return status;
121         }
122
123         /* Return variables */
124         *version = *r.out.version;
125
126         /* Return result */
127         if (werror) {
128                 *werror = r.out.result;
129         }
130
131         return werror_to_ntstatus(r.out.result);
132 }
133
134 NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli,
135                                    TALLOC_CTX *mem_ctx,
136                                    WERROR *werror)
137 {
138         struct PNP_GetGlobalState r;
139         NTSTATUS status;
140
141         /* In parameters */
142
143         if (DEBUGLEVEL >= 10) {
144                 NDR_PRINT_IN_DEBUG(PNP_GetGlobalState, &r);
145         }
146
147         status = cli_do_rpc_ndr(cli,
148                                 mem_ctx,
149                                 &ndr_table_ntsvcs,
150                                 NDR_PNP_GETGLOBALSTATE,
151                                 &r);
152
153         if (!NT_STATUS_IS_OK(status)) {
154                 return status;
155         }
156
157         if (DEBUGLEVEL >= 10) {
158                 NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, &r);
159         }
160
161         if (NT_STATUS_IS_ERR(status)) {
162                 return status;
163         }
164
165         /* Return variables */
166
167         /* Return result */
168         if (werror) {
169                 *werror = r.out.result;
170         }
171
172         return werror_to_ntstatus(r.out.result);
173 }
174
175 NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli,
176                                   TALLOC_CTX *mem_ctx,
177                                   WERROR *werror)
178 {
179         struct PNP_InitDetection r;
180         NTSTATUS status;
181
182         /* In parameters */
183
184         if (DEBUGLEVEL >= 10) {
185                 NDR_PRINT_IN_DEBUG(PNP_InitDetection, &r);
186         }
187
188         status = cli_do_rpc_ndr(cli,
189                                 mem_ctx,
190                                 &ndr_table_ntsvcs,
191                                 NDR_PNP_INITDETECTION,
192                                 &r);
193
194         if (!NT_STATUS_IS_OK(status)) {
195                 return status;
196         }
197
198         if (DEBUGLEVEL >= 10) {
199                 NDR_PRINT_OUT_DEBUG(PNP_InitDetection, &r);
200         }
201
202         if (NT_STATUS_IS_ERR(status)) {
203                 return status;
204         }
205
206         /* Return variables */
207
208         /* Return result */
209         if (werror) {
210                 *werror = r.out.result;
211         }
212
213         return werror_to_ntstatus(r.out.result);
214 }
215
216 NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli,
217                                 TALLOC_CTX *mem_ctx,
218                                 WERROR *werror)
219 {
220         struct PNP_ReportLogOn r;
221         NTSTATUS status;
222
223         /* In parameters */
224
225         if (DEBUGLEVEL >= 10) {
226                 NDR_PRINT_IN_DEBUG(PNP_ReportLogOn, &r);
227         }
228
229         status = cli_do_rpc_ndr(cli,
230                                 mem_ctx,
231                                 &ndr_table_ntsvcs,
232                                 NDR_PNP_REPORTLOGON,
233                                 &r);
234
235         if (!NT_STATUS_IS_OK(status)) {
236                 return status;
237         }
238
239         if (DEBUGLEVEL >= 10) {
240                 NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, &r);
241         }
242
243         if (NT_STATUS_IS_ERR(status)) {
244                 return status;
245         }
246
247         /* Return variables */
248
249         /* Return result */
250         if (werror) {
251                 *werror = r.out.result;
252         }
253
254         return werror_to_ntstatus(r.out.result);
255 }
256
257 NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli,
258                                            TALLOC_CTX *mem_ctx,
259                                            const char *devicepath /* [in] [ref,charset(UTF16)] */,
260                                            uint32_t flags /* [in]  */,
261                                            WERROR *werror)
262 {
263         struct PNP_ValidateDeviceInstance r;
264         NTSTATUS status;
265
266         /* In parameters */
267         r.in.devicepath = devicepath;
268         r.in.flags = flags;
269
270         if (DEBUGLEVEL >= 10) {
271                 NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, &r);
272         }
273
274         status = cli_do_rpc_ndr(cli,
275                                 mem_ctx,
276                                 &ndr_table_ntsvcs,
277                                 NDR_PNP_VALIDATEDEVICEINSTANCE,
278                                 &r);
279
280         if (!NT_STATUS_IS_OK(status)) {
281                 return status;
282         }
283
284         if (DEBUGLEVEL >= 10) {
285                 NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, &r);
286         }
287
288         if (NT_STATUS_IS_ERR(status)) {
289                 return status;
290         }
291
292         /* Return variables */
293
294         /* Return result */
295         if (werror) {
296                 *werror = r.out.result;
297         }
298
299         return werror_to_ntstatus(r.out.result);
300 }
301
302 NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli,
303                                           TALLOC_CTX *mem_ctx,
304                                           WERROR *werror)
305 {
306         struct PNP_GetRootDeviceInstance r;
307         NTSTATUS status;
308
309         /* In parameters */
310
311         if (DEBUGLEVEL >= 10) {
312                 NDR_PRINT_IN_DEBUG(PNP_GetRootDeviceInstance, &r);
313         }
314
315         status = cli_do_rpc_ndr(cli,
316                                 mem_ctx,
317                                 &ndr_table_ntsvcs,
318                                 NDR_PNP_GETROOTDEVICEINSTANCE,
319                                 &r);
320
321         if (!NT_STATUS_IS_OK(status)) {
322                 return status;
323         }
324
325         if (DEBUGLEVEL >= 10) {
326                 NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, &r);
327         }
328
329         if (NT_STATUS_IS_ERR(status)) {
330                 return status;
331         }
332
333         /* Return variables */
334
335         /* Return result */
336         if (werror) {
337                 *werror = r.out.result;
338         }
339
340         return werror_to_ntstatus(r.out.result);
341 }
342
343 NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli,
344                                              TALLOC_CTX *mem_ctx,
345                                              WERROR *werror)
346 {
347         struct PNP_GetRelatedDeviceInstance r;
348         NTSTATUS status;
349
350         /* In parameters */
351
352         if (DEBUGLEVEL >= 10) {
353                 NDR_PRINT_IN_DEBUG(PNP_GetRelatedDeviceInstance, &r);
354         }
355
356         status = cli_do_rpc_ndr(cli,
357                                 mem_ctx,
358                                 &ndr_table_ntsvcs,
359                                 NDR_PNP_GETRELATEDDEVICEINSTANCE,
360                                 &r);
361
362         if (!NT_STATUS_IS_OK(status)) {
363                 return status;
364         }
365
366         if (DEBUGLEVEL >= 10) {
367                 NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, &r);
368         }
369
370         if (NT_STATUS_IS_ERR(status)) {
371                 return status;
372         }
373
374         /* Return variables */
375
376         /* Return result */
377         if (werror) {
378                 *werror = r.out.result;
379         }
380
381         return werror_to_ntstatus(r.out.result);
382 }
383
384 NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
385                                      TALLOC_CTX *mem_ctx,
386                                      WERROR *werror)
387 {
388         struct PNP_EnumerateSubKeys r;
389         NTSTATUS status;
390
391         /* In parameters */
392
393         if (DEBUGLEVEL >= 10) {
394                 NDR_PRINT_IN_DEBUG(PNP_EnumerateSubKeys, &r);
395         }
396
397         status = cli_do_rpc_ndr(cli,
398                                 mem_ctx,
399                                 &ndr_table_ntsvcs,
400                                 NDR_PNP_ENUMERATESUBKEYS,
401                                 &r);
402
403         if (!NT_STATUS_IS_OK(status)) {
404                 return status;
405         }
406
407         if (DEBUGLEVEL >= 10) {
408                 NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, &r);
409         }
410
411         if (NT_STATUS_IS_ERR(status)) {
412                 return status;
413         }
414
415         /* Return variables */
416
417         /* Return result */
418         if (werror) {
419                 *werror = r.out.result;
420         }
421
422         return werror_to_ntstatus(r.out.result);
423 }
424
425 NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
426                                   TALLOC_CTX *mem_ctx,
427                                   WERROR *werror)
428 {
429         struct PNP_GetDeviceList r;
430         NTSTATUS status;
431
432         /* In parameters */
433
434         if (DEBUGLEVEL >= 10) {
435                 NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, &r);
436         }
437
438         status = cli_do_rpc_ndr(cli,
439                                 mem_ctx,
440                                 &ndr_table_ntsvcs,
441                                 NDR_PNP_GETDEVICELIST,
442                                 &r);
443
444         if (!NT_STATUS_IS_OK(status)) {
445                 return status;
446         }
447
448         if (DEBUGLEVEL >= 10) {
449                 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, &r);
450         }
451
452         if (NT_STATUS_IS_ERR(status)) {
453                 return status;
454         }
455
456         /* Return variables */
457
458         /* Return result */
459         if (werror) {
460                 *werror = r.out.result;
461         }
462
463         return werror_to_ntstatus(r.out.result);
464 }
465
466 NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
467                                       TALLOC_CTX *mem_ctx,
468                                       const char *devicename /* [in] [unique,charset(UTF16)] */,
469                                       uint32_t *size /* [out] [ref] */,
470                                       uint32_t flags /* [in]  */,
471                                       WERROR *werror)
472 {
473         struct PNP_GetDeviceListSize r;
474         NTSTATUS status;
475
476         /* In parameters */
477         r.in.devicename = devicename;
478         r.in.flags = flags;
479
480         if (DEBUGLEVEL >= 10) {
481                 NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, &r);
482         }
483
484         status = cli_do_rpc_ndr(cli,
485                                 mem_ctx,
486                                 &ndr_table_ntsvcs,
487                                 NDR_PNP_GETDEVICELISTSIZE,
488                                 &r);
489
490         if (!NT_STATUS_IS_OK(status)) {
491                 return status;
492         }
493
494         if (DEBUGLEVEL >= 10) {
495                 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, &r);
496         }
497
498         if (NT_STATUS_IS_ERR(status)) {
499                 return status;
500         }
501
502         /* Return variables */
503         *size = *r.out.size;
504
505         /* Return result */
506         if (werror) {
507                 *werror = r.out.result;
508         }
509
510         return werror_to_ntstatus(r.out.result);
511 }
512
513 NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli,
514                              TALLOC_CTX *mem_ctx,
515                              WERROR *werror)
516 {
517         struct PNP_GetDepth r;
518         NTSTATUS status;
519
520         /* In parameters */
521
522         if (DEBUGLEVEL >= 10) {
523                 NDR_PRINT_IN_DEBUG(PNP_GetDepth, &r);
524         }
525
526         status = cli_do_rpc_ndr(cli,
527                                 mem_ctx,
528                                 &ndr_table_ntsvcs,
529                                 NDR_PNP_GETDEPTH,
530                                 &r);
531
532         if (!NT_STATUS_IS_OK(status)) {
533                 return status;
534         }
535
536         if (DEBUGLEVEL >= 10) {
537                 NDR_PRINT_OUT_DEBUG(PNP_GetDepth, &r);
538         }
539
540         if (NT_STATUS_IS_ERR(status)) {
541                 return status;
542         }
543
544         /* Return variables */
545
546         /* Return result */
547         if (werror) {
548                 *werror = r.out.result;
549         }
550
551         return werror_to_ntstatus(r.out.result);
552 }
553
554 NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
555                                      TALLOC_CTX *mem_ctx,
556                                      const char *devicepath /* [in] [ref,charset(UTF16)] */,
557                                      uint32_t property /* [in]  */,
558                                      uint32_t *unknown1 /* [in,out] [ref] */,
559                                      uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
560                                      uint32_t *buffer_size /* [in,out] [ref] */,
561                                      uint32_t *needed /* [in,out] [ref] */,
562                                      uint32_t unknown3 /* [in]  */,
563                                      WERROR *werror)
564 {
565         struct PNP_GetDeviceRegProp r;
566         NTSTATUS status;
567
568         /* In parameters */
569         r.in.devicepath = devicepath;
570         r.in.property = property;
571         r.in.unknown1 = unknown1;
572         r.in.buffer_size = buffer_size;
573         r.in.needed = needed;
574         r.in.unknown3 = unknown3;
575
576         if (DEBUGLEVEL >= 10) {
577                 NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, &r);
578         }
579
580         status = cli_do_rpc_ndr(cli,
581                                 mem_ctx,
582                                 &ndr_table_ntsvcs,
583                                 NDR_PNP_GETDEVICEREGPROP,
584                                 &r);
585
586         if (!NT_STATUS_IS_OK(status)) {
587                 return status;
588         }
589
590         if (DEBUGLEVEL >= 10) {
591                 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, &r);
592         }
593
594         if (NT_STATUS_IS_ERR(status)) {
595                 return status;
596         }
597
598         /* Return variables */
599         *unknown1 = *r.out.unknown1;
600         memcpy(buffer, r.out.buffer, *r.in.buffer_size * sizeof(*buffer));
601         *buffer_size = *r.out.buffer_size;
602         *needed = *r.out.needed;
603
604         /* Return result */
605         if (werror) {
606                 *werror = r.out.result;
607         }
608
609         return werror_to_ntstatus(r.out.result);
610 }
611
612 NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli,
613                                      TALLOC_CTX *mem_ctx,
614                                      WERROR *werror)
615 {
616         struct PNP_SetDeviceRegProp r;
617         NTSTATUS status;
618
619         /* In parameters */
620
621         if (DEBUGLEVEL >= 10) {
622                 NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, &r);
623         }
624
625         status = cli_do_rpc_ndr(cli,
626                                 mem_ctx,
627                                 &ndr_table_ntsvcs,
628                                 NDR_PNP_SETDEVICEREGPROP,
629                                 &r);
630
631         if (!NT_STATUS_IS_OK(status)) {
632                 return status;
633         }
634
635         if (DEBUGLEVEL >= 10) {
636                 NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, &r);
637         }
638
639         if (NT_STATUS_IS_ERR(status)) {
640                 return status;
641         }
642
643         /* Return variables */
644
645         /* Return result */
646         if (werror) {
647                 *werror = r.out.result;
648         }
649
650         return werror_to_ntstatus(r.out.result);
651 }
652
653 NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli,
654                                      TALLOC_CTX *mem_ctx,
655                                      WERROR *werror)
656 {
657         struct PNP_GetClassInstance r;
658         NTSTATUS status;
659
660         /* In parameters */
661
662         if (DEBUGLEVEL >= 10) {
663                 NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, &r);
664         }
665
666         status = cli_do_rpc_ndr(cli,
667                                 mem_ctx,
668                                 &ndr_table_ntsvcs,
669                                 NDR_PNP_GETCLASSINSTANCE,
670                                 &r);
671
672         if (!NT_STATUS_IS_OK(status)) {
673                 return status;
674         }
675
676         if (DEBUGLEVEL >= 10) {
677                 NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, &r);
678         }
679
680         if (NT_STATUS_IS_ERR(status)) {
681                 return status;
682         }
683
684         /* Return variables */
685
686         /* Return result */
687         if (werror) {
688                 *werror = r.out.result;
689         }
690
691         return werror_to_ntstatus(r.out.result);
692 }
693
694 NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli,
695                               TALLOC_CTX *mem_ctx,
696                               WERROR *werror)
697 {
698         struct PNP_CreateKey r;
699         NTSTATUS status;
700
701         /* In parameters */
702
703         if (DEBUGLEVEL >= 10) {
704                 NDR_PRINT_IN_DEBUG(PNP_CreateKey, &r);
705         }
706
707         status = cli_do_rpc_ndr(cli,
708                                 mem_ctx,
709                                 &ndr_table_ntsvcs,
710                                 NDR_PNP_CREATEKEY,
711                                 &r);
712
713         if (!NT_STATUS_IS_OK(status)) {
714                 return status;
715         }
716
717         if (DEBUGLEVEL >= 10) {
718                 NDR_PRINT_OUT_DEBUG(PNP_CreateKey, &r);
719         }
720
721         if (NT_STATUS_IS_ERR(status)) {
722                 return status;
723         }
724
725         /* Return variables */
726
727         /* Return result */
728         if (werror) {
729                 *werror = r.out.result;
730         }
731
732         return werror_to_ntstatus(r.out.result);
733 }
734
735 NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli,
736                                       TALLOC_CTX *mem_ctx,
737                                       WERROR *werror)
738 {
739         struct PNP_DeleteRegistryKey r;
740         NTSTATUS status;
741
742         /* In parameters */
743
744         if (DEBUGLEVEL >= 10) {
745                 NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, &r);
746         }
747
748         status = cli_do_rpc_ndr(cli,
749                                 mem_ctx,
750                                 &ndr_table_ntsvcs,
751                                 NDR_PNP_DELETEREGISTRYKEY,
752                                 &r);
753
754         if (!NT_STATUS_IS_OK(status)) {
755                 return status;
756         }
757
758         if (DEBUGLEVEL >= 10) {
759                 NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, &r);
760         }
761
762         if (NT_STATUS_IS_ERR(status)) {
763                 return status;
764         }
765
766         /* Return variables */
767
768         /* Return result */
769         if (werror) {
770                 *werror = r.out.result;
771         }
772
773         return werror_to_ntstatus(r.out.result);
774 }
775
776 NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli,
777                                   TALLOC_CTX *mem_ctx,
778                                   WERROR *werror)
779 {
780         struct PNP_GetClassCount r;
781         NTSTATUS status;
782
783         /* In parameters */
784
785         if (DEBUGLEVEL >= 10) {
786                 NDR_PRINT_IN_DEBUG(PNP_GetClassCount, &r);
787         }
788
789         status = cli_do_rpc_ndr(cli,
790                                 mem_ctx,
791                                 &ndr_table_ntsvcs,
792                                 NDR_PNP_GETCLASSCOUNT,
793                                 &r);
794
795         if (!NT_STATUS_IS_OK(status)) {
796                 return status;
797         }
798
799         if (DEBUGLEVEL >= 10) {
800                 NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, &r);
801         }
802
803         if (NT_STATUS_IS_ERR(status)) {
804                 return status;
805         }
806
807         /* Return variables */
808
809         /* Return result */
810         if (werror) {
811                 *werror = r.out.result;
812         }
813
814         return werror_to_ntstatus(r.out.result);
815 }
816
817 NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli,
818                                  TALLOC_CTX *mem_ctx,
819                                  WERROR *werror)
820 {
821         struct PNP_GetClassName r;
822         NTSTATUS status;
823
824         /* In parameters */
825
826         if (DEBUGLEVEL >= 10) {
827                 NDR_PRINT_IN_DEBUG(PNP_GetClassName, &r);
828         }
829
830         status = cli_do_rpc_ndr(cli,
831                                 mem_ctx,
832                                 &ndr_table_ntsvcs,
833                                 NDR_PNP_GETCLASSNAME,
834                                 &r);
835
836         if (!NT_STATUS_IS_OK(status)) {
837                 return status;
838         }
839
840         if (DEBUGLEVEL >= 10) {
841                 NDR_PRINT_OUT_DEBUG(PNP_GetClassName, &r);
842         }
843
844         if (NT_STATUS_IS_ERR(status)) {
845                 return status;
846         }
847
848         /* Return variables */
849
850         /* Return result */
851         if (werror) {
852                 *werror = r.out.result;
853         }
854
855         return werror_to_ntstatus(r.out.result);
856 }
857
858 NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli,
859                                    TALLOC_CTX *mem_ctx,
860                                    WERROR *werror)
861 {
862         struct PNP_DeleteClassKey r;
863         NTSTATUS status;
864
865         /* In parameters */
866
867         if (DEBUGLEVEL >= 10) {
868                 NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, &r);
869         }
870
871         status = cli_do_rpc_ndr(cli,
872                                 mem_ctx,
873                                 &ndr_table_ntsvcs,
874                                 NDR_PNP_DELETECLASSKEY,
875                                 &r);
876
877         if (!NT_STATUS_IS_OK(status)) {
878                 return status;
879         }
880
881         if (DEBUGLEVEL >= 10) {
882                 NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, &r);
883         }
884
885         if (NT_STATUS_IS_ERR(status)) {
886                 return status;
887         }
888
889         /* Return variables */
890
891         /* Return result */
892         if (werror) {
893                 *werror = r.out.result;
894         }
895
896         return werror_to_ntstatus(r.out.result);
897 }
898
899 NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli,
900                                             TALLOC_CTX *mem_ctx,
901                                             WERROR *werror)
902 {
903         struct PNP_GetInterfaceDeviceAlias r;
904         NTSTATUS status;
905
906         /* In parameters */
907
908         if (DEBUGLEVEL >= 10) {
909                 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, &r);
910         }
911
912         status = cli_do_rpc_ndr(cli,
913                                 mem_ctx,
914                                 &ndr_table_ntsvcs,
915                                 NDR_PNP_GETINTERFACEDEVICEALIAS,
916                                 &r);
917
918         if (!NT_STATUS_IS_OK(status)) {
919                 return status;
920         }
921
922         if (DEBUGLEVEL >= 10) {
923                 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, &r);
924         }
925
926         if (NT_STATUS_IS_ERR(status)) {
927                 return status;
928         }
929
930         /* Return variables */
931
932         /* Return result */
933         if (werror) {
934                 *werror = r.out.result;
935         }
936
937         return werror_to_ntstatus(r.out.result);
938 }
939
940 NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli,
941                                            TALLOC_CTX *mem_ctx,
942                                            WERROR *werror)
943 {
944         struct PNP_GetInterfaceDeviceList r;
945         NTSTATUS status;
946
947         /* In parameters */
948
949         if (DEBUGLEVEL >= 10) {
950                 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, &r);
951         }
952
953         status = cli_do_rpc_ndr(cli,
954                                 mem_ctx,
955                                 &ndr_table_ntsvcs,
956                                 NDR_PNP_GETINTERFACEDEVICELIST,
957                                 &r);
958
959         if (!NT_STATUS_IS_OK(status)) {
960                 return status;
961         }
962
963         if (DEBUGLEVEL >= 10) {
964                 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, &r);
965         }
966
967         if (NT_STATUS_IS_ERR(status)) {
968                 return status;
969         }
970
971         /* Return variables */
972
973         /* Return result */
974         if (werror) {
975                 *werror = r.out.result;
976         }
977
978         return werror_to_ntstatus(r.out.result);
979 }
980
981 NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli,
982                                                TALLOC_CTX *mem_ctx,
983                                                WERROR *werror)
984 {
985         struct PNP_GetInterfaceDeviceListSize r;
986         NTSTATUS status;
987
988         /* In parameters */
989
990         if (DEBUGLEVEL >= 10) {
991                 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, &r);
992         }
993
994         status = cli_do_rpc_ndr(cli,
995                                 mem_ctx,
996                                 &ndr_table_ntsvcs,
997                                 NDR_PNP_GETINTERFACEDEVICELISTSIZE,
998                                 &r);
999
1000         if (!NT_STATUS_IS_OK(status)) {
1001                 return status;
1002         }
1003
1004         if (DEBUGLEVEL >= 10) {
1005                 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, &r);
1006         }
1007
1008         if (NT_STATUS_IS_ERR(status)) {
1009                 return status;
1010         }
1011
1012         /* Return variables */
1013
1014         /* Return result */
1015         if (werror) {
1016                 *werror = r.out.result;
1017         }
1018
1019         return werror_to_ntstatus(r.out.result);
1020 }
1021
1022 NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli,
1023                                                    TALLOC_CTX *mem_ctx,
1024                                                    WERROR *werror)
1025 {
1026         struct PNP_RegisterDeviceClassAssociation r;
1027         NTSTATUS status;
1028
1029         /* In parameters */
1030
1031         if (DEBUGLEVEL >= 10) {
1032                 NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, &r);
1033         }
1034
1035         status = cli_do_rpc_ndr(cli,
1036                                 mem_ctx,
1037                                 &ndr_table_ntsvcs,
1038                                 NDR_PNP_REGISTERDEVICECLASSASSOCIATION,
1039                                 &r);
1040
1041         if (!NT_STATUS_IS_OK(status)) {
1042                 return status;
1043         }
1044
1045         if (DEBUGLEVEL >= 10) {
1046                 NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, &r);
1047         }
1048
1049         if (NT_STATUS_IS_ERR(status)) {
1050                 return status;
1051         }
1052
1053         /* Return variables */
1054
1055         /* Return result */
1056         if (werror) {
1057                 *werror = r.out.result;
1058         }
1059
1060         return werror_to_ntstatus(r.out.result);
1061 }
1062
1063 NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli,
1064                                                      TALLOC_CTX *mem_ctx,
1065                                                      WERROR *werror)
1066 {
1067         struct PNP_UnregisterDeviceClassAssociation r;
1068         NTSTATUS status;
1069
1070         /* In parameters */
1071
1072         if (DEBUGLEVEL >= 10) {
1073                 NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, &r);
1074         }
1075
1076         status = cli_do_rpc_ndr(cli,
1077                                 mem_ctx,
1078                                 &ndr_table_ntsvcs,
1079                                 NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION,
1080                                 &r);
1081
1082         if (!NT_STATUS_IS_OK(status)) {
1083                 return status;
1084         }
1085
1086         if (DEBUGLEVEL >= 10) {
1087                 NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, &r);
1088         }
1089
1090         if (NT_STATUS_IS_ERR(status)) {
1091                 return status;
1092         }
1093
1094         /* Return variables */
1095
1096         /* Return result */
1097         if (werror) {
1098                 *werror = r.out.result;
1099         }
1100
1101         return werror_to_ntstatus(r.out.result);
1102 }
1103
1104 NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli,
1105                                     TALLOC_CTX *mem_ctx,
1106                                     WERROR *werror)
1107 {
1108         struct PNP_GetClassRegProp r;
1109         NTSTATUS status;
1110
1111         /* In parameters */
1112
1113         if (DEBUGLEVEL >= 10) {
1114                 NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, &r);
1115         }
1116
1117         status = cli_do_rpc_ndr(cli,
1118                                 mem_ctx,
1119                                 &ndr_table_ntsvcs,
1120                                 NDR_PNP_GETCLASSREGPROP,
1121                                 &r);
1122
1123         if (!NT_STATUS_IS_OK(status)) {
1124                 return status;
1125         }
1126
1127         if (DEBUGLEVEL >= 10) {
1128                 NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, &r);
1129         }
1130
1131         if (NT_STATUS_IS_ERR(status)) {
1132                 return status;
1133         }
1134
1135         /* Return variables */
1136
1137         /* Return result */
1138         if (werror) {
1139                 *werror = r.out.result;
1140         }
1141
1142         return werror_to_ntstatus(r.out.result);
1143 }
1144
1145 NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli,
1146                                     TALLOC_CTX *mem_ctx,
1147                                     WERROR *werror)
1148 {
1149         struct PNP_SetClassRegProp r;
1150         NTSTATUS status;
1151
1152         /* In parameters */
1153
1154         if (DEBUGLEVEL >= 10) {
1155                 NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, &r);
1156         }
1157
1158         status = cli_do_rpc_ndr(cli,
1159                                 mem_ctx,
1160                                 &ndr_table_ntsvcs,
1161                                 NDR_PNP_SETCLASSREGPROP,
1162                                 &r);
1163
1164         if (!NT_STATUS_IS_OK(status)) {
1165                 return status;
1166         }
1167
1168         if (DEBUGLEVEL >= 10) {
1169                 NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, &r);
1170         }
1171
1172         if (NT_STATUS_IS_ERR(status)) {
1173                 return status;
1174         }
1175
1176         /* Return variables */
1177
1178         /* Return result */
1179         if (werror) {
1180                 *werror = r.out.result;
1181         }
1182
1183         return werror_to_ntstatus(r.out.result);
1184 }
1185
1186 NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli,
1187                                   TALLOC_CTX *mem_ctx,
1188                                   WERROR *werror)
1189 {
1190         struct PNP_CreateDevInst r;
1191         NTSTATUS status;
1192
1193         /* In parameters */
1194
1195         if (DEBUGLEVEL >= 10) {
1196                 NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, &r);
1197         }
1198
1199         status = cli_do_rpc_ndr(cli,
1200                                 mem_ctx,
1201                                 &ndr_table_ntsvcs,
1202                                 NDR_PNP_CREATEDEVINST,
1203                                 &r);
1204
1205         if (!NT_STATUS_IS_OK(status)) {
1206                 return status;
1207         }
1208
1209         if (DEBUGLEVEL >= 10) {
1210                 NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, &r);
1211         }
1212
1213         if (NT_STATUS_IS_ERR(status)) {
1214                 return status;
1215         }
1216
1217         /* Return variables */
1218
1219         /* Return result */
1220         if (werror) {
1221                 *werror = r.out.result;
1222         }
1223
1224         return werror_to_ntstatus(r.out.result);
1225 }
1226
1227 NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli,
1228                                          TALLOC_CTX *mem_ctx,
1229                                          WERROR *werror)
1230 {
1231         struct PNP_DeviceInstanceAction r;
1232         NTSTATUS status;
1233
1234         /* In parameters */
1235
1236         if (DEBUGLEVEL >= 10) {
1237                 NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, &r);
1238         }
1239
1240         status = cli_do_rpc_ndr(cli,
1241                                 mem_ctx,
1242                                 &ndr_table_ntsvcs,
1243                                 NDR_PNP_DEVICEINSTANCEACTION,
1244                                 &r);
1245
1246         if (!NT_STATUS_IS_OK(status)) {
1247                 return status;
1248         }
1249
1250         if (DEBUGLEVEL >= 10) {
1251                 NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, &r);
1252         }
1253
1254         if (NT_STATUS_IS_ERR(status)) {
1255                 return status;
1256         }
1257
1258         /* Return variables */
1259
1260         /* Return result */
1261         if (werror) {
1262                 *werror = r.out.result;
1263         }
1264
1265         return werror_to_ntstatus(r.out.result);
1266 }
1267
1268 NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli,
1269                                     TALLOC_CTX *mem_ctx,
1270                                     WERROR *werror)
1271 {
1272         struct PNP_GetDeviceStatus r;
1273         NTSTATUS status;
1274
1275         /* In parameters */
1276
1277         if (DEBUGLEVEL >= 10) {
1278                 NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, &r);
1279         }
1280
1281         status = cli_do_rpc_ndr(cli,
1282                                 mem_ctx,
1283                                 &ndr_table_ntsvcs,
1284                                 NDR_PNP_GETDEVICESTATUS,
1285                                 &r);
1286
1287         if (!NT_STATUS_IS_OK(status)) {
1288                 return status;
1289         }
1290
1291         if (DEBUGLEVEL >= 10) {
1292                 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, &r);
1293         }
1294
1295         if (NT_STATUS_IS_ERR(status)) {
1296                 return status;
1297         }
1298
1299         /* Return variables */
1300
1301         /* Return result */
1302         if (werror) {
1303                 *werror = r.out.result;
1304         }
1305
1306         return werror_to_ntstatus(r.out.result);
1307 }
1308
1309 NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli,
1310                                      TALLOC_CTX *mem_ctx,
1311                                      WERROR *werror)
1312 {
1313         struct PNP_SetDeviceProblem r;
1314         NTSTATUS status;
1315
1316         /* In parameters */
1317
1318         if (DEBUGLEVEL >= 10) {
1319                 NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, &r);
1320         }
1321
1322         status = cli_do_rpc_ndr(cli,
1323                                 mem_ctx,
1324                                 &ndr_table_ntsvcs,
1325                                 NDR_PNP_SETDEVICEPROBLEM,
1326                                 &r);
1327
1328         if (!NT_STATUS_IS_OK(status)) {
1329                 return status;
1330         }
1331
1332         if (DEBUGLEVEL >= 10) {
1333                 NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, &r);
1334         }
1335
1336         if (NT_STATUS_IS_ERR(status)) {
1337                 return status;
1338         }
1339
1340         /* Return variables */
1341
1342         /* Return result */
1343         if (werror) {
1344                 *werror = r.out.result;
1345         }
1346
1347         return werror_to_ntstatus(r.out.result);
1348 }
1349
1350 NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli,
1351                                    TALLOC_CTX *mem_ctx,
1352                                    WERROR *werror)
1353 {
1354         struct PNP_DisableDevInst r;
1355         NTSTATUS status;
1356
1357         /* In parameters */
1358
1359         if (DEBUGLEVEL >= 10) {
1360                 NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, &r);
1361         }
1362
1363         status = cli_do_rpc_ndr(cli,
1364                                 mem_ctx,
1365                                 &ndr_table_ntsvcs,
1366                                 NDR_PNP_DISABLEDEVINST,
1367                                 &r);
1368
1369         if (!NT_STATUS_IS_OK(status)) {
1370                 return status;
1371         }
1372
1373         if (DEBUGLEVEL >= 10) {
1374                 NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, &r);
1375         }
1376
1377         if (NT_STATUS_IS_ERR(status)) {
1378                 return status;
1379         }
1380
1381         /* Return variables */
1382
1383         /* Return result */
1384         if (werror) {
1385                 *werror = r.out.result;
1386         }
1387
1388         return werror_to_ntstatus(r.out.result);
1389 }
1390
1391 NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli,
1392                                      TALLOC_CTX *mem_ctx,
1393                                      WERROR *werror)
1394 {
1395         struct PNP_UninstallDevInst r;
1396         NTSTATUS status;
1397
1398         /* In parameters */
1399
1400         if (DEBUGLEVEL >= 10) {
1401                 NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, &r);
1402         }
1403
1404         status = cli_do_rpc_ndr(cli,
1405                                 mem_ctx,
1406                                 &ndr_table_ntsvcs,
1407                                 NDR_PNP_UNINSTALLDEVINST,
1408                                 &r);
1409
1410         if (!NT_STATUS_IS_OK(status)) {
1411                 return status;
1412         }
1413
1414         if (DEBUGLEVEL >= 10) {
1415                 NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, &r);
1416         }
1417
1418         if (NT_STATUS_IS_ERR(status)) {
1419                 return status;
1420         }
1421
1422         /* Return variables */
1423
1424         /* Return result */
1425         if (werror) {
1426                 *werror = r.out.result;
1427         }
1428
1429         return werror_to_ntstatus(r.out.result);
1430 }
1431
1432 NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli,
1433                           TALLOC_CTX *mem_ctx,
1434                           WERROR *werror)
1435 {
1436         struct PNP_AddID r;
1437         NTSTATUS status;
1438
1439         /* In parameters */
1440
1441         if (DEBUGLEVEL >= 10) {
1442                 NDR_PRINT_IN_DEBUG(PNP_AddID, &r);
1443         }
1444
1445         status = cli_do_rpc_ndr(cli,
1446                                 mem_ctx,
1447                                 &ndr_table_ntsvcs,
1448                                 NDR_PNP_ADDID,
1449                                 &r);
1450
1451         if (!NT_STATUS_IS_OK(status)) {
1452                 return status;
1453         }
1454
1455         if (DEBUGLEVEL >= 10) {
1456                 NDR_PRINT_OUT_DEBUG(PNP_AddID, &r);
1457         }
1458
1459         if (NT_STATUS_IS_ERR(status)) {
1460                 return status;
1461         }
1462
1463         /* Return variables */
1464
1465         /* Return result */
1466         if (werror) {
1467                 *werror = r.out.result;
1468         }
1469
1470         return werror_to_ntstatus(r.out.result);
1471 }
1472
1473 NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli,
1474                                    TALLOC_CTX *mem_ctx,
1475                                    WERROR *werror)
1476 {
1477         struct PNP_RegisterDriver r;
1478         NTSTATUS status;
1479
1480         /* In parameters */
1481
1482         if (DEBUGLEVEL >= 10) {
1483                 NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, &r);
1484         }
1485
1486         status = cli_do_rpc_ndr(cli,
1487                                 mem_ctx,
1488                                 &ndr_table_ntsvcs,
1489                                 NDR_PNP_REGISTERDRIVER,
1490                                 &r);
1491
1492         if (!NT_STATUS_IS_OK(status)) {
1493                 return status;
1494         }
1495
1496         if (DEBUGLEVEL >= 10) {
1497                 NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, &r);
1498         }
1499
1500         if (NT_STATUS_IS_ERR(status)) {
1501                 return status;
1502         }
1503
1504         /* Return variables */
1505
1506         /* Return result */
1507         if (werror) {
1508                 *werror = r.out.result;
1509         }
1510
1511         return werror_to_ntstatus(r.out.result);
1512 }
1513
1514 NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli,
1515                                 TALLOC_CTX *mem_ctx,
1516                                 WERROR *werror)
1517 {
1518         struct PNP_QueryRemove r;
1519         NTSTATUS status;
1520
1521         /* In parameters */
1522
1523         if (DEBUGLEVEL >= 10) {
1524                 NDR_PRINT_IN_DEBUG(PNP_QueryRemove, &r);
1525         }
1526
1527         status = cli_do_rpc_ndr(cli,
1528                                 mem_ctx,
1529                                 &ndr_table_ntsvcs,
1530                                 NDR_PNP_QUERYREMOVE,
1531                                 &r);
1532
1533         if (!NT_STATUS_IS_OK(status)) {
1534                 return status;
1535         }
1536
1537         if (DEBUGLEVEL >= 10) {
1538                 NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, &r);
1539         }
1540
1541         if (NT_STATUS_IS_ERR(status)) {
1542                 return status;
1543         }
1544
1545         /* Return variables */
1546
1547         /* Return result */
1548         if (werror) {
1549                 *werror = r.out.result;
1550         }
1551
1552         return werror_to_ntstatus(r.out.result);
1553 }
1554
1555 NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli,
1556                                        TALLOC_CTX *mem_ctx,
1557                                        WERROR *werror)
1558 {
1559         struct PNP_RequestDeviceEject r;
1560         NTSTATUS status;
1561
1562         /* In parameters */
1563
1564         if (DEBUGLEVEL >= 10) {
1565                 NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, &r);
1566         }
1567
1568         status = cli_do_rpc_ndr(cli,
1569                                 mem_ctx,
1570                                 &ndr_table_ntsvcs,
1571                                 NDR_PNP_REQUESTDEVICEEJECT,
1572                                 &r);
1573
1574         if (!NT_STATUS_IS_OK(status)) {
1575                 return status;
1576         }
1577
1578         if (DEBUGLEVEL >= 10) {
1579                 NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, &r);
1580         }
1581
1582         if (NT_STATUS_IS_ERR(status)) {
1583                 return status;
1584         }
1585
1586         /* Return variables */
1587
1588         /* Return result */
1589         if (werror) {
1590                 *werror = r.out.result;
1591         }
1592
1593         return werror_to_ntstatus(r.out.result);
1594 }
1595
1596 NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli,
1597                                          TALLOC_CTX *mem_ctx,
1598                                          WERROR *werror)
1599 {
1600         struct PNP_IsDockStationPresent r;
1601         NTSTATUS status;
1602
1603         /* In parameters */
1604
1605         if (DEBUGLEVEL >= 10) {
1606                 NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, &r);
1607         }
1608
1609         status = cli_do_rpc_ndr(cli,
1610                                 mem_ctx,
1611                                 &ndr_table_ntsvcs,
1612                                 NDR_PNP_ISDOCKSTATIONPRESENT,
1613                                 &r);
1614
1615         if (!NT_STATUS_IS_OK(status)) {
1616                 return status;
1617         }
1618
1619         if (DEBUGLEVEL >= 10) {
1620                 NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, &r);
1621         }
1622
1623         if (NT_STATUS_IS_ERR(status)) {
1624                 return status;
1625         }
1626
1627         /* Return variables */
1628
1629         /* Return result */
1630         if (werror) {
1631                 *werror = r.out.result;
1632         }
1633
1634         return werror_to_ntstatus(r.out.result);
1635 }
1636
1637 NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli,
1638                                    TALLOC_CTX *mem_ctx,
1639                                    WERROR *werror)
1640 {
1641         struct PNP_RequestEjectPC r;
1642         NTSTATUS status;
1643
1644         /* In parameters */
1645
1646         if (DEBUGLEVEL >= 10) {
1647                 NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, &r);
1648         }
1649
1650         status = cli_do_rpc_ndr(cli,
1651                                 mem_ctx,
1652                                 &ndr_table_ntsvcs,
1653                                 NDR_PNP_REQUESTEJECTPC,
1654                                 &r);
1655
1656         if (!NT_STATUS_IS_OK(status)) {
1657                 return status;
1658         }
1659
1660         if (DEBUGLEVEL >= 10) {
1661                 NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, &r);
1662         }
1663
1664         if (NT_STATUS_IS_ERR(status)) {
1665                 return status;
1666         }
1667
1668         /* Return variables */
1669
1670         /* Return result */
1671         if (werror) {
1672                 *werror = r.out.result;
1673         }
1674
1675         return werror_to_ntstatus(r.out.result);
1676 }
1677
1678 NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli,
1679                                 TALLOC_CTX *mem_ctx,
1680                                 uint32_t unknown1 /* [in]  */,
1681                                 const char *devicepath /* [in] [ref,charset(UTF16)] */,
1682                                 uint32_t unknown2 /* [in]  */,
1683                                 uint32_t *unknown3 /* [in,out] [ref] */,
1684                                 uint16_t *unknown4 /* [in,out] [unique] */,
1685                                 const char *unknown5 /* [in] [unique,charset(UTF16)] */,
1686                                 const char **unknown5a /* [out] [unique,charset(UTF16)] */,
1687                                 uint32_t unknown6 /* [in]  */,
1688                                 uint32_t unknown7 /* [in]  */,
1689                                 WERROR *werror)
1690 {
1691         struct PNP_HwProfFlags r;
1692         NTSTATUS status;
1693
1694         /* In parameters */
1695         r.in.unknown1 = unknown1;
1696         r.in.devicepath = devicepath;
1697         r.in.unknown2 = unknown2;
1698         r.in.unknown3 = unknown3;
1699         r.in.unknown4 = unknown4;
1700         r.in.unknown5 = unknown5;
1701         r.in.unknown6 = unknown6;
1702         r.in.unknown7 = unknown7;
1703
1704         if (DEBUGLEVEL >= 10) {
1705                 NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, &r);
1706         }
1707
1708         status = cli_do_rpc_ndr(cli,
1709                                 mem_ctx,
1710                                 &ndr_table_ntsvcs,
1711                                 NDR_PNP_HWPROFFLAGS,
1712                                 &r);
1713
1714         if (!NT_STATUS_IS_OK(status)) {
1715                 return status;
1716         }
1717
1718         if (DEBUGLEVEL >= 10) {
1719                 NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, &r);
1720         }
1721
1722         if (NT_STATUS_IS_ERR(status)) {
1723                 return status;
1724         }
1725
1726         /* Return variables */
1727         *unknown3 = *r.out.unknown3;
1728         if (unknown4 && r.out.unknown4) {
1729                 *unknown4 = *r.out.unknown4;
1730         }
1731         if (unknown5a && r.out.unknown5a) {
1732                 *unknown5a = *r.out.unknown5a;
1733         }
1734
1735         /* Return result */
1736         if (werror) {
1737                 *werror = r.out.result;
1738         }
1739
1740         return werror_to_ntstatus(r.out.result);
1741 }
1742
1743 NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli,
1744                                   TALLOC_CTX *mem_ctx,
1745                                   uint32_t idx /* [in]  */,
1746                                   struct PNP_HwProfInfo *info /* [in,out] [ref] */,
1747                                   uint32_t unknown1 /* [in]  */,
1748                                   uint32_t unknown2 /* [in]  */,
1749                                   WERROR *werror)
1750 {
1751         struct PNP_GetHwProfInfo r;
1752         NTSTATUS status;
1753
1754         /* In parameters */
1755         r.in.idx = idx;
1756         r.in.info = info;
1757         r.in.unknown1 = unknown1;
1758         r.in.unknown2 = unknown2;
1759
1760         if (DEBUGLEVEL >= 10) {
1761                 NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, &r);
1762         }
1763
1764         status = cli_do_rpc_ndr(cli,
1765                                 mem_ctx,
1766                                 &ndr_table_ntsvcs,
1767                                 NDR_PNP_GETHWPROFINFO,
1768                                 &r);
1769
1770         if (!NT_STATUS_IS_OK(status)) {
1771                 return status;
1772         }
1773
1774         if (DEBUGLEVEL >= 10) {
1775                 NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, &r);
1776         }
1777
1778         if (NT_STATUS_IS_ERR(status)) {
1779                 return status;
1780         }
1781
1782         /* Return variables */
1783         *info = *r.out.info;
1784
1785         /* Return result */
1786         if (werror) {
1787                 *werror = r.out.result;
1788         }
1789
1790         return werror_to_ntstatus(r.out.result);
1791 }
1792
1793 NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli,
1794                                     TALLOC_CTX *mem_ctx,
1795                                     WERROR *werror)
1796 {
1797         struct PNP_AddEmptyLogConf r;
1798         NTSTATUS status;
1799
1800         /* In parameters */
1801
1802         if (DEBUGLEVEL >= 10) {
1803                 NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, &r);
1804         }
1805
1806         status = cli_do_rpc_ndr(cli,
1807                                 mem_ctx,
1808                                 &ndr_table_ntsvcs,
1809                                 NDR_PNP_ADDEMPTYLOGCONF,
1810                                 &r);
1811
1812         if (!NT_STATUS_IS_OK(status)) {
1813                 return status;
1814         }
1815
1816         if (DEBUGLEVEL >= 10) {
1817                 NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, &r);
1818         }
1819
1820         if (NT_STATUS_IS_ERR(status)) {
1821                 return status;
1822         }
1823
1824         /* Return variables */
1825
1826         /* Return result */
1827         if (werror) {
1828                 *werror = r.out.result;
1829         }
1830
1831         return werror_to_ntstatus(r.out.result);
1832 }
1833
1834 NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli,
1835                                 TALLOC_CTX *mem_ctx,
1836                                 WERROR *werror)
1837 {
1838         struct PNP_FreeLogConf r;
1839         NTSTATUS status;
1840
1841         /* In parameters */
1842
1843         if (DEBUGLEVEL >= 10) {
1844                 NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, &r);
1845         }
1846
1847         status = cli_do_rpc_ndr(cli,
1848                                 mem_ctx,
1849                                 &ndr_table_ntsvcs,
1850                                 NDR_PNP_FREELOGCONF,
1851                                 &r);
1852
1853         if (!NT_STATUS_IS_OK(status)) {
1854                 return status;
1855         }
1856
1857         if (DEBUGLEVEL >= 10) {
1858                 NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, &r);
1859         }
1860
1861         if (NT_STATUS_IS_ERR(status)) {
1862                 return status;
1863         }
1864
1865         /* Return variables */
1866
1867         /* Return result */
1868         if (werror) {
1869                 *werror = r.out.result;
1870         }
1871
1872         return werror_to_ntstatus(r.out.result);
1873 }
1874
1875 NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli,
1876                                     TALLOC_CTX *mem_ctx,
1877                                     WERROR *werror)
1878 {
1879         struct PNP_GetFirstLogConf r;
1880         NTSTATUS status;
1881
1882         /* In parameters */
1883
1884         if (DEBUGLEVEL >= 10) {
1885                 NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, &r);
1886         }
1887
1888         status = cli_do_rpc_ndr(cli,
1889                                 mem_ctx,
1890                                 &ndr_table_ntsvcs,
1891                                 NDR_PNP_GETFIRSTLOGCONF,
1892                                 &r);
1893
1894         if (!NT_STATUS_IS_OK(status)) {
1895                 return status;
1896         }
1897
1898         if (DEBUGLEVEL >= 10) {
1899                 NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, &r);
1900         }
1901
1902         if (NT_STATUS_IS_ERR(status)) {
1903                 return status;
1904         }
1905
1906         /* Return variables */
1907
1908         /* Return result */
1909         if (werror) {
1910                 *werror = r.out.result;
1911         }
1912
1913         return werror_to_ntstatus(r.out.result);
1914 }
1915
1916 NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli,
1917                                    TALLOC_CTX *mem_ctx,
1918                                    WERROR *werror)
1919 {
1920         struct PNP_GetNextLogConf r;
1921         NTSTATUS status;
1922
1923         /* In parameters */
1924
1925         if (DEBUGLEVEL >= 10) {
1926                 NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, &r);
1927         }
1928
1929         status = cli_do_rpc_ndr(cli,
1930                                 mem_ctx,
1931                                 &ndr_table_ntsvcs,
1932                                 NDR_PNP_GETNEXTLOGCONF,
1933                                 &r);
1934
1935         if (!NT_STATUS_IS_OK(status)) {
1936                 return status;
1937         }
1938
1939         if (DEBUGLEVEL >= 10) {
1940                 NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, &r);
1941         }
1942
1943         if (NT_STATUS_IS_ERR(status)) {
1944                 return status;
1945         }
1946
1947         /* Return variables */
1948
1949         /* Return result */
1950         if (werror) {
1951                 *werror = r.out.result;
1952         }
1953
1954         return werror_to_ntstatus(r.out.result);
1955 }
1956
1957 NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli,
1958                                        TALLOC_CTX *mem_ctx,
1959                                        WERROR *werror)
1960 {
1961         struct PNP_GetLogConfPriority r;
1962         NTSTATUS status;
1963
1964         /* In parameters */
1965
1966         if (DEBUGLEVEL >= 10) {
1967                 NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, &r);
1968         }
1969
1970         status = cli_do_rpc_ndr(cli,
1971                                 mem_ctx,
1972                                 &ndr_table_ntsvcs,
1973                                 NDR_PNP_GETLOGCONFPRIORITY,
1974                                 &r);
1975
1976         if (!NT_STATUS_IS_OK(status)) {
1977                 return status;
1978         }
1979
1980         if (DEBUGLEVEL >= 10) {
1981                 NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, &r);
1982         }
1983
1984         if (NT_STATUS_IS_ERR(status)) {
1985                 return status;
1986         }
1987
1988         /* Return variables */
1989
1990         /* Return result */
1991         if (werror) {
1992                 *werror = r.out.result;
1993         }
1994
1995         return werror_to_ntstatus(r.out.result);
1996 }
1997
1998 NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli,
1999                               TALLOC_CTX *mem_ctx,
2000                               WERROR *werror)
2001 {
2002         struct PNP_AddResDes r;
2003         NTSTATUS status;
2004
2005         /* In parameters */
2006
2007         if (DEBUGLEVEL >= 10) {
2008                 NDR_PRINT_IN_DEBUG(PNP_AddResDes, &r);
2009         }
2010
2011         status = cli_do_rpc_ndr(cli,
2012                                 mem_ctx,
2013                                 &ndr_table_ntsvcs,
2014                                 NDR_PNP_ADDRESDES,
2015                                 &r);
2016
2017         if (!NT_STATUS_IS_OK(status)) {
2018                 return status;
2019         }
2020
2021         if (DEBUGLEVEL >= 10) {
2022                 NDR_PRINT_OUT_DEBUG(PNP_AddResDes, &r);
2023         }
2024
2025         if (NT_STATUS_IS_ERR(status)) {
2026                 return status;
2027         }
2028
2029         /* Return variables */
2030
2031         /* Return result */
2032         if (werror) {
2033                 *werror = r.out.result;
2034         }
2035
2036         return werror_to_ntstatus(r.out.result);
2037 }
2038
2039 NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli,
2040                                TALLOC_CTX *mem_ctx,
2041                                WERROR *werror)
2042 {
2043         struct PNP_FreeResDes r;
2044         NTSTATUS status;
2045
2046         /* In parameters */
2047
2048         if (DEBUGLEVEL >= 10) {
2049                 NDR_PRINT_IN_DEBUG(PNP_FreeResDes, &r);
2050         }
2051
2052         status = cli_do_rpc_ndr(cli,
2053                                 mem_ctx,
2054                                 &ndr_table_ntsvcs,
2055                                 NDR_PNP_FREERESDES,
2056                                 &r);
2057
2058         if (!NT_STATUS_IS_OK(status)) {
2059                 return status;
2060         }
2061
2062         if (DEBUGLEVEL >= 10) {
2063                 NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, &r);
2064         }
2065
2066         if (NT_STATUS_IS_ERR(status)) {
2067                 return status;
2068         }
2069
2070         /* Return variables */
2071
2072         /* Return result */
2073         if (werror) {
2074                 *werror = r.out.result;
2075         }
2076
2077         return werror_to_ntstatus(r.out.result);
2078 }
2079
2080 NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli,
2081                                   TALLOC_CTX *mem_ctx,
2082                                   WERROR *werror)
2083 {
2084         struct PNP_GetNextResDes r;
2085         NTSTATUS status;
2086
2087         /* In parameters */
2088
2089         if (DEBUGLEVEL >= 10) {
2090                 NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, &r);
2091         }
2092
2093         status = cli_do_rpc_ndr(cli,
2094                                 mem_ctx,
2095                                 &ndr_table_ntsvcs,
2096                                 NDR_PNP_GETNEXTRESDES,
2097                                 &r);
2098
2099         if (!NT_STATUS_IS_OK(status)) {
2100                 return status;
2101         }
2102
2103         if (DEBUGLEVEL >= 10) {
2104                 NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, &r);
2105         }
2106
2107         if (NT_STATUS_IS_ERR(status)) {
2108                 return status;
2109         }
2110
2111         /* Return variables */
2112
2113         /* Return result */
2114         if (werror) {
2115                 *werror = r.out.result;
2116         }
2117
2118         return werror_to_ntstatus(r.out.result);
2119 }
2120
2121 NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli,
2122                                   TALLOC_CTX *mem_ctx,
2123                                   WERROR *werror)
2124 {
2125         struct PNP_GetResDesData r;
2126         NTSTATUS status;
2127
2128         /* In parameters */
2129
2130         if (DEBUGLEVEL >= 10) {
2131                 NDR_PRINT_IN_DEBUG(PNP_GetResDesData, &r);
2132         }
2133
2134         status = cli_do_rpc_ndr(cli,
2135                                 mem_ctx,
2136                                 &ndr_table_ntsvcs,
2137                                 NDR_PNP_GETRESDESDATA,
2138                                 &r);
2139
2140         if (!NT_STATUS_IS_OK(status)) {
2141                 return status;
2142         }
2143
2144         if (DEBUGLEVEL >= 10) {
2145                 NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, &r);
2146         }
2147
2148         if (NT_STATUS_IS_ERR(status)) {
2149                 return status;
2150         }
2151
2152         /* Return variables */
2153
2154         /* Return result */
2155         if (werror) {
2156                 *werror = r.out.result;
2157         }
2158
2159         return werror_to_ntstatus(r.out.result);
2160 }
2161
2162 NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli,
2163                                       TALLOC_CTX *mem_ctx,
2164                                       WERROR *werror)
2165 {
2166         struct PNP_GetResDesDataSize r;
2167         NTSTATUS status;
2168
2169         /* In parameters */
2170
2171         if (DEBUGLEVEL >= 10) {
2172                 NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, &r);
2173         }
2174
2175         status = cli_do_rpc_ndr(cli,
2176                                 mem_ctx,
2177                                 &ndr_table_ntsvcs,
2178                                 NDR_PNP_GETRESDESDATASIZE,
2179                                 &r);
2180
2181         if (!NT_STATUS_IS_OK(status)) {
2182                 return status;
2183         }
2184
2185         if (DEBUGLEVEL >= 10) {
2186                 NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, &r);
2187         }
2188
2189         if (NT_STATUS_IS_ERR(status)) {
2190                 return status;
2191         }
2192
2193         /* Return variables */
2194
2195         /* Return result */
2196         if (werror) {
2197                 *werror = r.out.result;
2198         }
2199
2200         return werror_to_ntstatus(r.out.result);
2201 }
2202
2203 NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli,
2204                                  TALLOC_CTX *mem_ctx,
2205                                  WERROR *werror)
2206 {
2207         struct PNP_ModifyResDes r;
2208         NTSTATUS status;
2209
2210         /* In parameters */
2211
2212         if (DEBUGLEVEL >= 10) {
2213                 NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, &r);
2214         }
2215
2216         status = cli_do_rpc_ndr(cli,
2217                                 mem_ctx,
2218                                 &ndr_table_ntsvcs,
2219                                 NDR_PNP_MODIFYRESDES,
2220                                 &r);
2221
2222         if (!NT_STATUS_IS_OK(status)) {
2223                 return status;
2224         }
2225
2226         if (DEBUGLEVEL >= 10) {
2227                 NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, &r);
2228         }
2229
2230         if (NT_STATUS_IS_ERR(status)) {
2231                 return status;
2232         }
2233
2234         /* Return variables */
2235
2236         /* Return result */
2237         if (werror) {
2238                 *werror = r.out.result;
2239         }
2240
2241         return werror_to_ntstatus(r.out.result);
2242 }
2243
2244 NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli,
2245                                         TALLOC_CTX *mem_ctx,
2246                                         WERROR *werror)
2247 {
2248         struct PNP_DetectResourceLimit r;
2249         NTSTATUS status;
2250
2251         /* In parameters */
2252
2253         if (DEBUGLEVEL >= 10) {
2254                 NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, &r);
2255         }
2256
2257         status = cli_do_rpc_ndr(cli,
2258                                 mem_ctx,
2259                                 &ndr_table_ntsvcs,
2260                                 NDR_PNP_DETECTRESOURCELIMIT,
2261                                 &r);
2262
2263         if (!NT_STATUS_IS_OK(status)) {
2264                 return status;
2265         }
2266
2267         if (DEBUGLEVEL >= 10) {
2268                 NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, &r);
2269         }
2270
2271         if (NT_STATUS_IS_ERR(status)) {
2272                 return status;
2273         }
2274
2275         /* Return variables */
2276
2277         /* Return result */
2278         if (werror) {
2279                 *werror = r.out.result;
2280         }
2281
2282         return werror_to_ntstatus(r.out.result);
2283 }
2284
2285 NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli,
2286                                      TALLOC_CTX *mem_ctx,
2287                                      WERROR *werror)
2288 {
2289         struct PNP_QueryResConfList r;
2290         NTSTATUS status;
2291
2292         /* In parameters */
2293
2294         if (DEBUGLEVEL >= 10) {
2295                 NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, &r);
2296         }
2297
2298         status = cli_do_rpc_ndr(cli,
2299                                 mem_ctx,
2300                                 &ndr_table_ntsvcs,
2301                                 NDR_PNP_QUERYRESCONFLIST,
2302                                 &r);
2303
2304         if (!NT_STATUS_IS_OK(status)) {
2305                 return status;
2306         }
2307
2308         if (DEBUGLEVEL >= 10) {
2309                 NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, &r);
2310         }
2311
2312         if (NT_STATUS_IS_ERR(status)) {
2313                 return status;
2314         }
2315
2316         /* Return variables */
2317
2318         /* Return result */
2319         if (werror) {
2320                 *werror = r.out.result;
2321         }
2322
2323         return werror_to_ntstatus(r.out.result);
2324 }
2325
2326 NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli,
2327                               TALLOC_CTX *mem_ctx,
2328                               WERROR *werror)
2329 {
2330         struct PNP_SetHwProf r;
2331         NTSTATUS status;
2332
2333         /* In parameters */
2334
2335         if (DEBUGLEVEL >= 10) {
2336                 NDR_PRINT_IN_DEBUG(PNP_SetHwProf, &r);
2337         }
2338
2339         status = cli_do_rpc_ndr(cli,
2340                                 mem_ctx,
2341                                 &ndr_table_ntsvcs,
2342                                 NDR_PNP_SETHWPROF,
2343                                 &r);
2344
2345         if (!NT_STATUS_IS_OK(status)) {
2346                 return status;
2347         }
2348
2349         if (DEBUGLEVEL >= 10) {
2350                 NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, &r);
2351         }
2352
2353         if (NT_STATUS_IS_ERR(status)) {
2354                 return status;
2355         }
2356
2357         /* Return variables */
2358
2359         /* Return result */
2360         if (werror) {
2361                 *werror = r.out.result;
2362         }
2363
2364         return werror_to_ntstatus(r.out.result);
2365 }
2366
2367 NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli,
2368                                             TALLOC_CTX *mem_ctx,
2369                                             WERROR *werror)
2370 {
2371         struct PNP_QueryArbitratorFreeData r;
2372         NTSTATUS status;
2373
2374         /* In parameters */
2375
2376         if (DEBUGLEVEL >= 10) {
2377                 NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, &r);
2378         }
2379
2380         status = cli_do_rpc_ndr(cli,
2381                                 mem_ctx,
2382                                 &ndr_table_ntsvcs,
2383                                 NDR_PNP_QUERYARBITRATORFREEDATA,
2384                                 &r);
2385
2386         if (!NT_STATUS_IS_OK(status)) {
2387                 return status;
2388         }
2389
2390         if (DEBUGLEVEL >= 10) {
2391                 NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, &r);
2392         }
2393
2394         if (NT_STATUS_IS_ERR(status)) {
2395                 return status;
2396         }
2397
2398         /* Return variables */
2399
2400         /* Return result */
2401         if (werror) {
2402                 *werror = r.out.result;
2403         }
2404
2405         return werror_to_ntstatus(r.out.result);
2406 }
2407
2408 NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli,
2409                                             TALLOC_CTX *mem_ctx,
2410                                             WERROR *werror)
2411 {
2412         struct PNP_QueryArbitratorFreeSize r;
2413         NTSTATUS status;
2414
2415         /* In parameters */
2416
2417         if (DEBUGLEVEL >= 10) {
2418                 NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, &r);
2419         }
2420
2421         status = cli_do_rpc_ndr(cli,
2422                                 mem_ctx,
2423                                 &ndr_table_ntsvcs,
2424                                 NDR_PNP_QUERYARBITRATORFREESIZE,
2425                                 &r);
2426
2427         if (!NT_STATUS_IS_OK(status)) {
2428                 return status;
2429         }
2430
2431         if (DEBUGLEVEL >= 10) {
2432                 NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, &r);
2433         }
2434
2435         if (NT_STATUS_IS_ERR(status)) {
2436                 return status;
2437         }
2438
2439         /* Return variables */
2440
2441         /* Return result */
2442         if (werror) {
2443                 *werror = r.out.result;
2444         }
2445
2446         return werror_to_ntstatus(r.out.result);
2447 }
2448
2449 NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli,
2450                                  TALLOC_CTX *mem_ctx,
2451                                  WERROR *werror)
2452 {
2453         struct PNP_RunDetection r;
2454         NTSTATUS status;
2455
2456         /* In parameters */
2457
2458         if (DEBUGLEVEL >= 10) {
2459                 NDR_PRINT_IN_DEBUG(PNP_RunDetection, &r);
2460         }
2461
2462         status = cli_do_rpc_ndr(cli,
2463                                 mem_ctx,
2464                                 &ndr_table_ntsvcs,
2465                                 NDR_PNP_RUNDETECTION,
2466                                 &r);
2467
2468         if (!NT_STATUS_IS_OK(status)) {
2469                 return status;
2470         }
2471
2472         if (DEBUGLEVEL >= 10) {
2473                 NDR_PRINT_OUT_DEBUG(PNP_RunDetection, &r);
2474         }
2475
2476         if (NT_STATUS_IS_ERR(status)) {
2477                 return status;
2478         }
2479
2480         /* Return variables */
2481
2482         /* Return result */
2483         if (werror) {
2484                 *werror = r.out.result;
2485         }
2486
2487         return werror_to_ntstatus(r.out.result);
2488 }
2489
2490 NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli,
2491                                          TALLOC_CTX *mem_ctx,
2492                                          WERROR *werror)
2493 {
2494         struct PNP_RegisterNotification r;
2495         NTSTATUS status;
2496
2497         /* In parameters */
2498
2499         if (DEBUGLEVEL >= 10) {
2500                 NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, &r);
2501         }
2502
2503         status = cli_do_rpc_ndr(cli,
2504                                 mem_ctx,
2505                                 &ndr_table_ntsvcs,
2506                                 NDR_PNP_REGISTERNOTIFICATION,
2507                                 &r);
2508
2509         if (!NT_STATUS_IS_OK(status)) {
2510                 return status;
2511         }
2512
2513         if (DEBUGLEVEL >= 10) {
2514                 NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, &r);
2515         }
2516
2517         if (NT_STATUS_IS_ERR(status)) {
2518                 return status;
2519         }
2520
2521         /* Return variables */
2522
2523         /* Return result */
2524         if (werror) {
2525                 *werror = r.out.result;
2526         }
2527
2528         return werror_to_ntstatus(r.out.result);
2529 }
2530
2531 NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli,
2532                                            TALLOC_CTX *mem_ctx,
2533                                            WERROR *werror)
2534 {
2535         struct PNP_UnregisterNotification r;
2536         NTSTATUS status;
2537
2538         /* In parameters */
2539
2540         if (DEBUGLEVEL >= 10) {
2541                 NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, &r);
2542         }
2543
2544         status = cli_do_rpc_ndr(cli,
2545                                 mem_ctx,
2546                                 &ndr_table_ntsvcs,
2547                                 NDR_PNP_UNREGISTERNOTIFICATION,
2548                                 &r);
2549
2550         if (!NT_STATUS_IS_OK(status)) {
2551                 return status;
2552         }
2553
2554         if (DEBUGLEVEL >= 10) {
2555                 NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, &r);
2556         }
2557
2558         if (NT_STATUS_IS_ERR(status)) {
2559                 return status;
2560         }
2561
2562         /* Return variables */
2563
2564         /* Return result */
2565         if (werror) {
2566                 *werror = r.out.result;
2567         }
2568
2569         return werror_to_ntstatus(r.out.result);
2570 }
2571
2572 NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli,
2573                                      TALLOC_CTX *mem_ctx,
2574                                      WERROR *werror)
2575 {
2576         struct PNP_GetCustomDevProp r;
2577         NTSTATUS status;
2578
2579         /* In parameters */
2580
2581         if (DEBUGLEVEL >= 10) {
2582                 NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, &r);
2583         }
2584
2585         status = cli_do_rpc_ndr(cli,
2586                                 mem_ctx,
2587                                 &ndr_table_ntsvcs,
2588                                 NDR_PNP_GETCUSTOMDEVPROP,
2589                                 &r);
2590
2591         if (!NT_STATUS_IS_OK(status)) {
2592                 return status;
2593         }
2594
2595         if (DEBUGLEVEL >= 10) {
2596                 NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, &r);
2597         }
2598
2599         if (NT_STATUS_IS_ERR(status)) {
2600                 return status;
2601         }
2602
2603         /* Return variables */
2604
2605         /* Return result */
2606         if (werror) {
2607                 *werror = r.out.result;
2608         }
2609
2610         return werror_to_ntstatus(r.out.result);
2611 }
2612
2613 NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli,
2614                                        TALLOC_CTX *mem_ctx,
2615                                        WERROR *werror)
2616 {
2617         struct PNP_GetVersionInternal r;
2618         NTSTATUS status;
2619
2620         /* In parameters */
2621
2622         if (DEBUGLEVEL >= 10) {
2623                 NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, &r);
2624         }
2625
2626         status = cli_do_rpc_ndr(cli,
2627                                 mem_ctx,
2628                                 &ndr_table_ntsvcs,
2629                                 NDR_PNP_GETVERSIONINTERNAL,
2630                                 &r);
2631
2632         if (!NT_STATUS_IS_OK(status)) {
2633                 return status;
2634         }
2635
2636         if (DEBUGLEVEL >= 10) {
2637                 NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, &r);
2638         }
2639
2640         if (NT_STATUS_IS_ERR(status)) {
2641                 return status;
2642         }
2643
2644         /* Return variables */
2645
2646         /* Return result */
2647         if (werror) {
2648                 *werror = r.out.result;
2649         }
2650
2651         return werror_to_ntstatus(r.out.result);
2652 }
2653
2654 NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli,
2655                                          TALLOC_CTX *mem_ctx,
2656                                          WERROR *werror)
2657 {
2658         struct PNP_GetBlockedDriverInfo r;
2659         NTSTATUS status;
2660
2661         /* In parameters */
2662
2663         if (DEBUGLEVEL >= 10) {
2664                 NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, &r);
2665         }
2666
2667         status = cli_do_rpc_ndr(cli,
2668                                 mem_ctx,
2669                                 &ndr_table_ntsvcs,
2670                                 NDR_PNP_GETBLOCKEDDRIVERINFO,
2671                                 &r);
2672
2673         if (!NT_STATUS_IS_OK(status)) {
2674                 return status;
2675         }
2676
2677         if (DEBUGLEVEL >= 10) {
2678                 NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, &r);
2679         }
2680
2681         if (NT_STATUS_IS_ERR(status)) {
2682                 return status;
2683         }
2684
2685         /* Return variables */
2686
2687         /* Return result */
2688         if (werror) {
2689                 *werror = r.out.result;
2690         }
2691
2692         return werror_to_ntstatus(r.out.result);
2693 }
2694
2695 NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli,
2696                                                     TALLOC_CTX *mem_ctx,
2697                                                     WERROR *werror)
2698 {
2699         struct PNP_GetServerSideDeviceInstallFlags r;
2700         NTSTATUS status;
2701
2702         /* In parameters */
2703
2704         if (DEBUGLEVEL >= 10) {
2705                 NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, &r);
2706         }
2707
2708         status = cli_do_rpc_ndr(cli,
2709                                 mem_ctx,
2710                                 &ndr_table_ntsvcs,
2711                                 NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS,
2712                                 &r);
2713
2714         if (!NT_STATUS_IS_OK(status)) {
2715                 return status;
2716         }
2717
2718         if (DEBUGLEVEL >= 10) {
2719                 NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, &r);
2720         }
2721
2722         if (NT_STATUS_IS_ERR(status)) {
2723                 return status;
2724         }
2725
2726         /* Return variables */
2727
2728         /* Return result */
2729         if (werror) {
2730                 *werror = r.out.result;
2731         }
2732
2733         return werror_to_ntstatus(r.out.result);
2734 }
2735