librpc/gen_ndr
[metze/samba/wip.git] / source3 / librpc / gen_ndr / ndr_dcom.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "librpc/gen_ndr/ndr_dcom.h"
5
6 #include "librpc/gen_ndr/ndr_orpc.h"
7 #include "librpc/gen_ndr/ndr_misc.h"
8 static enum ndr_err_code ndr_push_UseProtSeq(struct ndr_push *ndr, int flags, const struct UseProtSeq *r)
9 {
10         if (flags & NDR_IN) {
11         }
12         if (flags & NDR_OUT) {
13         }
14         return NDR_ERR_SUCCESS;
15 }
16
17 static enum ndr_err_code ndr_pull_UseProtSeq(struct ndr_pull *ndr, int flags, struct UseProtSeq *r)
18 {
19         if (flags & NDR_IN) {
20         }
21         if (flags & NDR_OUT) {
22         }
23         return NDR_ERR_SUCCESS;
24 }
25
26 _PUBLIC_ void ndr_print_UseProtSeq(struct ndr_print *ndr, const char *name, int flags, const struct UseProtSeq *r)
27 {
28         ndr_print_struct(ndr, name, "UseProtSeq");
29         ndr->depth++;
30         if (flags & NDR_SET_VALUES) {
31                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
32         }
33         if (flags & NDR_IN) {
34                 ndr_print_struct(ndr, "in", "UseProtSeq");
35                 ndr->depth++;
36                 ndr->depth--;
37         }
38         if (flags & NDR_OUT) {
39                 ndr_print_struct(ndr, "out", "UseProtSeq");
40                 ndr->depth++;
41                 ndr->depth--;
42         }
43         ndr->depth--;
44 }
45
46 static enum ndr_err_code ndr_push_GetCustomProtseqInfo(struct ndr_push *ndr, int flags, const struct GetCustomProtseqInfo *r)
47 {
48         if (flags & NDR_IN) {
49         }
50         if (flags & NDR_OUT) {
51         }
52         return NDR_ERR_SUCCESS;
53 }
54
55 static enum ndr_err_code ndr_pull_GetCustomProtseqInfo(struct ndr_pull *ndr, int flags, struct GetCustomProtseqInfo *r)
56 {
57         if (flags & NDR_IN) {
58         }
59         if (flags & NDR_OUT) {
60         }
61         return NDR_ERR_SUCCESS;
62 }
63
64 _PUBLIC_ void ndr_print_GetCustomProtseqInfo(struct ndr_print *ndr, const char *name, int flags, const struct GetCustomProtseqInfo *r)
65 {
66         ndr_print_struct(ndr, name, "GetCustomProtseqInfo");
67         ndr->depth++;
68         if (flags & NDR_SET_VALUES) {
69                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
70         }
71         if (flags & NDR_IN) {
72                 ndr_print_struct(ndr, "in", "GetCustomProtseqInfo");
73                 ndr->depth++;
74                 ndr->depth--;
75         }
76         if (flags & NDR_OUT) {
77                 ndr_print_struct(ndr, "out", "GetCustomProtseqInfo");
78                 ndr->depth++;
79                 ndr->depth--;
80         }
81         ndr->depth--;
82 }
83
84 static enum ndr_err_code ndr_push_UpdateResolverBindings(struct ndr_push *ndr, int flags, const struct UpdateResolverBindings *r)
85 {
86         if (flags & NDR_IN) {
87         }
88         if (flags & NDR_OUT) {
89         }
90         return NDR_ERR_SUCCESS;
91 }
92
93 static enum ndr_err_code ndr_pull_UpdateResolverBindings(struct ndr_pull *ndr, int flags, struct UpdateResolverBindings *r)
94 {
95         if (flags & NDR_IN) {
96         }
97         if (flags & NDR_OUT) {
98         }
99         return NDR_ERR_SUCCESS;
100 }
101
102 _PUBLIC_ void ndr_print_UpdateResolverBindings(struct ndr_print *ndr, const char *name, int flags, const struct UpdateResolverBindings *r)
103 {
104         ndr_print_struct(ndr, name, "UpdateResolverBindings");
105         ndr->depth++;
106         if (flags & NDR_SET_VALUES) {
107                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
108         }
109         if (flags & NDR_IN) {
110                 ndr_print_struct(ndr, "in", "UpdateResolverBindings");
111                 ndr->depth++;
112                 ndr->depth--;
113         }
114         if (flags & NDR_OUT) {
115                 ndr_print_struct(ndr, "out", "UpdateResolverBindings");
116                 ndr->depth++;
117                 ndr->depth--;
118         }
119         ndr->depth--;
120 }
121
122 static const struct ndr_interface_call dcom_Unknown_calls[] = {
123         {
124                 "UseProtSeq",
125                 sizeof(struct UseProtSeq),
126                 (ndr_push_flags_fn_t) ndr_push_UseProtSeq,
127                 (ndr_pull_flags_fn_t) ndr_pull_UseProtSeq,
128                 (ndr_print_function_t) ndr_print_UseProtSeq,
129                 false,
130         },
131         {
132                 "GetCustomProtseqInfo",
133                 sizeof(struct GetCustomProtseqInfo),
134                 (ndr_push_flags_fn_t) ndr_push_GetCustomProtseqInfo,
135                 (ndr_pull_flags_fn_t) ndr_pull_GetCustomProtseqInfo,
136                 (ndr_print_function_t) ndr_print_GetCustomProtseqInfo,
137                 false,
138         },
139         {
140                 "UpdateResolverBindings",
141                 sizeof(struct UpdateResolverBindings),
142                 (ndr_push_flags_fn_t) ndr_push_UpdateResolverBindings,
143                 (ndr_pull_flags_fn_t) ndr_pull_UpdateResolverBindings,
144                 (ndr_print_function_t) ndr_print_UpdateResolverBindings,
145                 false,
146         },
147         { NULL, 0, NULL, NULL, NULL, false }
148 };
149
150 static const char * const dcom_Unknown_endpoint_strings[] = {
151         "ncacn_np:[\\pipe\\dcom_Unknown]", 
152 };
153
154 static const struct ndr_interface_string_array dcom_Unknown_endpoints = {
155         .count  = 1,
156         .names  = dcom_Unknown_endpoint_strings
157 };
158
159 static const char * const dcom_Unknown_authservice_strings[] = {
160         "host", 
161 };
162
163 static const struct ndr_interface_string_array dcom_Unknown_authservices = {
164         .count  = 1,
165         .names  = dcom_Unknown_authservice_strings
166 };
167
168
169 const struct ndr_interface_table ndr_table_dcom_Unknown = {
170         .name           = "dcom_Unknown",
171         .syntax_id      = {
172                 {0x18f70770,0x8e64,0x11cf,{0x9a,0xf1},{0x00,0x20,0xaf,0x6e,0x72,0xf4}},
173                 NDR_DCOM_UNKNOWN_VERSION
174         },
175         .helpstring     = NDR_DCOM_UNKNOWN_HELPSTRING,
176         .num_calls      = 3,
177         .calls          = dcom_Unknown_calls,
178         .endpoints      = &dcom_Unknown_endpoints,
179         .authservices   = &dcom_Unknown_authservices
180 };
181
182 #include "librpc/gen_ndr/ndr_orpc.h"
183 static enum ndr_err_code ndr_push_QueryInterface(struct ndr_push *ndr, int flags, const struct QueryInterface *r)
184 {
185         if (flags & NDR_IN) {
186                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
187                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.iid));
188                 if (r->in.iid) {
189                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.iid));
190                 }
191         }
192         if (flags & NDR_OUT) {
193                 if (r->out.ORPCthat == NULL) {
194                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
195                 }
196                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
197                 if (r->out.data == NULL) {
198                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
199                 }
200                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.data));
201                 if (*r->out.data) {
202                         NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.data));
203                 }
204                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
205         }
206         return NDR_ERR_SUCCESS;
207 }
208
209 static enum ndr_err_code ndr_pull_QueryInterface(struct ndr_pull *ndr, int flags, struct QueryInterface *r)
210 {
211         uint32_t _ptr_iid;
212         uint32_t _ptr_data;
213         TALLOC_CTX *_mem_save_ORPCthat_0;
214         TALLOC_CTX *_mem_save_iid_0;
215         TALLOC_CTX *_mem_save_data_0;
216         TALLOC_CTX *_mem_save_data_1;
217         if (flags & NDR_IN) {
218                 ZERO_STRUCT(r->out);
219
220                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
221                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_iid));
222                 if (_ptr_iid) {
223                         NDR_PULL_ALLOC(ndr, r->in.iid);
224                 } else {
225                         r->in.iid = NULL;
226                 }
227                 if (r->in.iid) {
228                         _mem_save_iid_0 = NDR_PULL_GET_MEM_CTX(ndr);
229                         NDR_PULL_SET_MEM_CTX(ndr, r->in.iid, 0);
230                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.iid));
231                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_iid_0, 0);
232                 }
233                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
234                 ZERO_STRUCTP(r->out.ORPCthat);
235                 NDR_PULL_ALLOC(ndr, r->out.data);
236                 ZERO_STRUCTP(r->out.data);
237         }
238         if (flags & NDR_OUT) {
239                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
240                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
241                 }
242                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
243                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
244                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
245                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
246                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
247                         NDR_PULL_ALLOC(ndr, r->out.data);
248                 }
249                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
250                 NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC);
251                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
252                 if (_ptr_data) {
253                         NDR_PULL_ALLOC(ndr, *r->out.data);
254                 } else {
255                         *r->out.data = NULL;
256                 }
257                 if (*r->out.data) {
258                         _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
259                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.data, 0);
260                         NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.data));
261                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
262                 }
263                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
264                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
265         }
266         return NDR_ERR_SUCCESS;
267 }
268
269 _PUBLIC_ void ndr_print_QueryInterface(struct ndr_print *ndr, const char *name, int flags, const struct QueryInterface *r)
270 {
271         ndr_print_struct(ndr, name, "QueryInterface");
272         ndr->depth++;
273         if (flags & NDR_SET_VALUES) {
274                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
275         }
276         if (flags & NDR_IN) {
277                 ndr_print_struct(ndr, "in", "QueryInterface");
278                 ndr->depth++;
279                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
280                 ndr_print_ptr(ndr, "iid", r->in.iid);
281                 ndr->depth++;
282                 if (r->in.iid) {
283                         ndr_print_GUID(ndr, "iid", r->in.iid);
284                 }
285                 ndr->depth--;
286                 ndr->depth--;
287         }
288         if (flags & NDR_OUT) {
289                 ndr_print_struct(ndr, "out", "QueryInterface");
290                 ndr->depth++;
291                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
292                 ndr->depth++;
293                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
294                 ndr->depth--;
295                 ndr_print_ptr(ndr, "data", r->out.data);
296                 ndr->depth++;
297                 ndr_print_ptr(ndr, "data", *r->out.data);
298                 ndr->depth++;
299                 if (*r->out.data) {
300                         ndr_print_MInterfacePointer(ndr, "data", *r->out.data);
301                 }
302                 ndr->depth--;
303                 ndr->depth--;
304                 ndr_print_WERROR(ndr, "result", r->out.result);
305                 ndr->depth--;
306         }
307         ndr->depth--;
308 }
309
310 static enum ndr_err_code ndr_push_AddRef(struct ndr_push *ndr, int flags, const struct AddRef *r)
311 {
312         if (flags & NDR_IN) {
313                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
314         }
315         if (flags & NDR_OUT) {
316                 if (r->out.ORPCthat == NULL) {
317                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
318                 }
319                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
320                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
321         }
322         return NDR_ERR_SUCCESS;
323 }
324
325 static enum ndr_err_code ndr_pull_AddRef(struct ndr_pull *ndr, int flags, struct AddRef *r)
326 {
327         TALLOC_CTX *_mem_save_ORPCthat_0;
328         if (flags & NDR_IN) {
329                 ZERO_STRUCT(r->out);
330
331                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
332                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
333                 ZERO_STRUCTP(r->out.ORPCthat);
334         }
335         if (flags & NDR_OUT) {
336                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
337                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
338                 }
339                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
340                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
341                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
342                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
343                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
344         }
345         return NDR_ERR_SUCCESS;
346 }
347
348 _PUBLIC_ void ndr_print_AddRef(struct ndr_print *ndr, const char *name, int flags, const struct AddRef *r)
349 {
350         ndr_print_struct(ndr, name, "AddRef");
351         ndr->depth++;
352         if (flags & NDR_SET_VALUES) {
353                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
354         }
355         if (flags & NDR_IN) {
356                 ndr_print_struct(ndr, "in", "AddRef");
357                 ndr->depth++;
358                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
359                 ndr->depth--;
360         }
361         if (flags & NDR_OUT) {
362                 ndr_print_struct(ndr, "out", "AddRef");
363                 ndr->depth++;
364                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
365                 ndr->depth++;
366                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
367                 ndr->depth--;
368                 ndr_print_uint32(ndr, "result", r->out.result);
369                 ndr->depth--;
370         }
371         ndr->depth--;
372 }
373
374 static enum ndr_err_code ndr_push_Release(struct ndr_push *ndr, int flags, const struct Release *r)
375 {
376         if (flags & NDR_IN) {
377                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
378         }
379         if (flags & NDR_OUT) {
380                 if (r->out.ORPCthat == NULL) {
381                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
382                 }
383                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
384                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
385         }
386         return NDR_ERR_SUCCESS;
387 }
388
389 static enum ndr_err_code ndr_pull_Release(struct ndr_pull *ndr, int flags, struct Release *r)
390 {
391         TALLOC_CTX *_mem_save_ORPCthat_0;
392         if (flags & NDR_IN) {
393                 ZERO_STRUCT(r->out);
394
395                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
396                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
397                 ZERO_STRUCTP(r->out.ORPCthat);
398         }
399         if (flags & NDR_OUT) {
400                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
401                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
402                 }
403                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
404                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
405                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
406                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
407                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
408         }
409         return NDR_ERR_SUCCESS;
410 }
411
412 _PUBLIC_ void ndr_print_Release(struct ndr_print *ndr, const char *name, int flags, const struct Release *r)
413 {
414         ndr_print_struct(ndr, name, "Release");
415         ndr->depth++;
416         if (flags & NDR_SET_VALUES) {
417                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
418         }
419         if (flags & NDR_IN) {
420                 ndr_print_struct(ndr, "in", "Release");
421                 ndr->depth++;
422                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
423                 ndr->depth--;
424         }
425         if (flags & NDR_OUT) {
426                 ndr_print_struct(ndr, "out", "Release");
427                 ndr->depth++;
428                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
429                 ndr->depth++;
430                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
431                 ndr->depth--;
432                 ndr_print_uint32(ndr, "result", r->out.result);
433                 ndr->depth--;
434         }
435         ndr->depth--;
436 }
437
438 static const struct ndr_interface_call IUnknown_calls[] = {
439         {
440                 "QueryInterface",
441                 sizeof(struct QueryInterface),
442                 (ndr_push_flags_fn_t) ndr_push_QueryInterface,
443                 (ndr_pull_flags_fn_t) ndr_pull_QueryInterface,
444                 (ndr_print_function_t) ndr_print_QueryInterface,
445                 false,
446         },
447         {
448                 "AddRef",
449                 sizeof(struct AddRef),
450                 (ndr_push_flags_fn_t) ndr_push_AddRef,
451                 (ndr_pull_flags_fn_t) ndr_pull_AddRef,
452                 (ndr_print_function_t) ndr_print_AddRef,
453                 false,
454         },
455         {
456                 "Release",
457                 sizeof(struct Release),
458                 (ndr_push_flags_fn_t) ndr_push_Release,
459                 (ndr_pull_flags_fn_t) ndr_pull_Release,
460                 (ndr_print_function_t) ndr_print_Release,
461                 false,
462         },
463         { NULL, 0, NULL, NULL, NULL, false }
464 };
465
466 static const char * const IUnknown_endpoint_strings[] = {
467         "ncacn_np:[\\pipe\\IUnknown]", 
468 };
469
470 static const struct ndr_interface_string_array IUnknown_endpoints = {
471         .count  = 1,
472         .names  = IUnknown_endpoint_strings
473 };
474
475 static const char * const IUnknown_authservice_strings[] = {
476         "host", 
477 };
478
479 static const struct ndr_interface_string_array IUnknown_authservices = {
480         .count  = 1,
481         .names  = IUnknown_authservice_strings
482 };
483
484
485 const struct ndr_interface_table ndr_table_IUnknown = {
486         .name           = "IUnknown",
487         .syntax_id      = {
488                 {0x00000000,0x0000,0x0000,{0xc0,0x00},{0x00,0x00,0x00,0x00,0x00,0x46}},
489                 NDR_IUNKNOWN_VERSION
490         },
491         .helpstring     = NDR_IUNKNOWN_HELPSTRING,
492         .num_calls      = 3,
493         .calls          = IUnknown_calls,
494         .endpoints      = &IUnknown_endpoints,
495         .authservices   = &IUnknown_authservices
496 };
497
498 #include "librpc/gen_ndr/ndr_orpc.h"
499 static enum ndr_err_code ndr_push_CreateInstance(struct ndr_push *ndr, int flags, const struct CreateInstance *r)
500 {
501         if (flags & NDR_IN) {
502                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
503                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pUnknown));
504                 if (r->in.pUnknown) {
505                         NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pUnknown));
506                 }
507                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.iid));
508                 if (r->in.iid) {
509                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.iid));
510                 }
511         }
512         if (flags & NDR_OUT) {
513                 if (r->out.ORPCthat == NULL) {
514                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
515                 }
516                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
517                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.ppv));
518                 if (r->out.ppv) {
519                         NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppv));
520                 }
521                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
522         }
523         return NDR_ERR_SUCCESS;
524 }
525
526 static enum ndr_err_code ndr_pull_CreateInstance(struct ndr_pull *ndr, int flags, struct CreateInstance *r)
527 {
528         uint32_t _ptr_pUnknown;
529         uint32_t _ptr_iid;
530         uint32_t _ptr_ppv;
531         TALLOC_CTX *_mem_save_ORPCthat_0;
532         TALLOC_CTX *_mem_save_pUnknown_0;
533         TALLOC_CTX *_mem_save_iid_0;
534         TALLOC_CTX *_mem_save_ppv_0;
535         if (flags & NDR_IN) {
536                 ZERO_STRUCT(r->out);
537
538                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
539                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pUnknown));
540                 if (_ptr_pUnknown) {
541                         NDR_PULL_ALLOC(ndr, r->in.pUnknown);
542                 } else {
543                         r->in.pUnknown = NULL;
544                 }
545                 if (r->in.pUnknown) {
546                         _mem_save_pUnknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
547                         NDR_PULL_SET_MEM_CTX(ndr, r->in.pUnknown, 0);
548                         NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pUnknown));
549                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pUnknown_0, 0);
550                 }
551                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_iid));
552                 if (_ptr_iid) {
553                         NDR_PULL_ALLOC(ndr, r->in.iid);
554                 } else {
555                         r->in.iid = NULL;
556                 }
557                 if (r->in.iid) {
558                         _mem_save_iid_0 = NDR_PULL_GET_MEM_CTX(ndr);
559                         NDR_PULL_SET_MEM_CTX(ndr, r->in.iid, 0);
560                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.iid));
561                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_iid_0, 0);
562                 }
563                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
564                 ZERO_STRUCTP(r->out.ORPCthat);
565         }
566         if (flags & NDR_OUT) {
567                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
568                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
569                 }
570                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
571                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
572                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
573                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
574                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ppv));
575                 if (_ptr_ppv) {
576                         NDR_PULL_ALLOC(ndr, r->out.ppv);
577                 } else {
578                         r->out.ppv = NULL;
579                 }
580                 if (r->out.ppv) {
581                         _mem_save_ppv_0 = NDR_PULL_GET_MEM_CTX(ndr);
582                         NDR_PULL_SET_MEM_CTX(ndr, r->out.ppv, 0);
583                         NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppv));
584                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppv_0, 0);
585                 }
586                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
587         }
588         return NDR_ERR_SUCCESS;
589 }
590
591 _PUBLIC_ void ndr_print_CreateInstance(struct ndr_print *ndr, const char *name, int flags, const struct CreateInstance *r)
592 {
593         ndr_print_struct(ndr, name, "CreateInstance");
594         ndr->depth++;
595         if (flags & NDR_SET_VALUES) {
596                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
597         }
598         if (flags & NDR_IN) {
599                 ndr_print_struct(ndr, "in", "CreateInstance");
600                 ndr->depth++;
601                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
602                 ndr_print_ptr(ndr, "pUnknown", r->in.pUnknown);
603                 ndr->depth++;
604                 if (r->in.pUnknown) {
605                         ndr_print_MInterfacePointer(ndr, "pUnknown", r->in.pUnknown);
606                 }
607                 ndr->depth--;
608                 ndr_print_ptr(ndr, "iid", r->in.iid);
609                 ndr->depth++;
610                 if (r->in.iid) {
611                         ndr_print_GUID(ndr, "iid", r->in.iid);
612                 }
613                 ndr->depth--;
614                 ndr->depth--;
615         }
616         if (flags & NDR_OUT) {
617                 ndr_print_struct(ndr, "out", "CreateInstance");
618                 ndr->depth++;
619                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
620                 ndr->depth++;
621                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
622                 ndr->depth--;
623                 ndr_print_ptr(ndr, "ppv", r->out.ppv);
624                 ndr->depth++;
625                 if (r->out.ppv) {
626                         ndr_print_MInterfacePointer(ndr, "ppv", r->out.ppv);
627                 }
628                 ndr->depth--;
629                 ndr_print_WERROR(ndr, "result", r->out.result);
630                 ndr->depth--;
631         }
632         ndr->depth--;
633 }
634
635 static enum ndr_err_code ndr_push_RemoteCreateInstance(struct ndr_push *ndr, int flags, const struct RemoteCreateInstance *r)
636 {
637         if (flags & NDR_IN) {
638                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
639         }
640         if (flags & NDR_OUT) {
641                 if (r->out.ORPCthat == NULL) {
642                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
643                 }
644                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
645                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
646         }
647         return NDR_ERR_SUCCESS;
648 }
649
650 static enum ndr_err_code ndr_pull_RemoteCreateInstance(struct ndr_pull *ndr, int flags, struct RemoteCreateInstance *r)
651 {
652         TALLOC_CTX *_mem_save_ORPCthat_0;
653         if (flags & NDR_IN) {
654                 ZERO_STRUCT(r->out);
655
656                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
657                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
658                 ZERO_STRUCTP(r->out.ORPCthat);
659         }
660         if (flags & NDR_OUT) {
661                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
662                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
663                 }
664                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
665                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
666                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
667                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
668                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
669         }
670         return NDR_ERR_SUCCESS;
671 }
672
673 _PUBLIC_ void ndr_print_RemoteCreateInstance(struct ndr_print *ndr, const char *name, int flags, const struct RemoteCreateInstance *r)
674 {
675         ndr_print_struct(ndr, name, "RemoteCreateInstance");
676         ndr->depth++;
677         if (flags & NDR_SET_VALUES) {
678                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
679         }
680         if (flags & NDR_IN) {
681                 ndr_print_struct(ndr, "in", "RemoteCreateInstance");
682                 ndr->depth++;
683                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
684                 ndr->depth--;
685         }
686         if (flags & NDR_OUT) {
687                 ndr_print_struct(ndr, "out", "RemoteCreateInstance");
688                 ndr->depth++;
689                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
690                 ndr->depth++;
691                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
692                 ndr->depth--;
693                 ndr_print_WERROR(ndr, "result", r->out.result);
694                 ndr->depth--;
695         }
696         ndr->depth--;
697 }
698
699 static enum ndr_err_code ndr_push_LockServer(struct ndr_push *ndr, int flags, const struct LockServer *r)
700 {
701         if (flags & NDR_IN) {
702                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
703                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lock));
704         }
705         if (flags & NDR_OUT) {
706                 if (r->out.ORPCthat == NULL) {
707                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
708                 }
709                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
710                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
711         }
712         return NDR_ERR_SUCCESS;
713 }
714
715 static enum ndr_err_code ndr_pull_LockServer(struct ndr_pull *ndr, int flags, struct LockServer *r)
716 {
717         TALLOC_CTX *_mem_save_ORPCthat_0;
718         if (flags & NDR_IN) {
719                 ZERO_STRUCT(r->out);
720
721                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
722                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lock));
723                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
724                 ZERO_STRUCTP(r->out.ORPCthat);
725         }
726         if (flags & NDR_OUT) {
727                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
728                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
729                 }
730                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
731                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
732                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
733                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
734                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
735         }
736         return NDR_ERR_SUCCESS;
737 }
738
739 _PUBLIC_ void ndr_print_LockServer(struct ndr_print *ndr, const char *name, int flags, const struct LockServer *r)
740 {
741         ndr_print_struct(ndr, name, "LockServer");
742         ndr->depth++;
743         if (flags & NDR_SET_VALUES) {
744                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
745         }
746         if (flags & NDR_IN) {
747                 ndr_print_struct(ndr, "in", "LockServer");
748                 ndr->depth++;
749                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
750                 ndr_print_uint8(ndr, "lock", r->in.lock);
751                 ndr->depth--;
752         }
753         if (flags & NDR_OUT) {
754                 ndr_print_struct(ndr, "out", "LockServer");
755                 ndr->depth++;
756                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
757                 ndr->depth++;
758                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
759                 ndr->depth--;
760                 ndr_print_WERROR(ndr, "result", r->out.result);
761                 ndr->depth--;
762         }
763         ndr->depth--;
764 }
765
766 static enum ndr_err_code ndr_push_RemoteLockServer(struct ndr_push *ndr, int flags, const struct RemoteLockServer *r)
767 {
768         if (flags & NDR_IN) {
769                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
770         }
771         if (flags & NDR_OUT) {
772                 if (r->out.ORPCthat == NULL) {
773                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
774                 }
775                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
776                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
777         }
778         return NDR_ERR_SUCCESS;
779 }
780
781 static enum ndr_err_code ndr_pull_RemoteLockServer(struct ndr_pull *ndr, int flags, struct RemoteLockServer *r)
782 {
783         TALLOC_CTX *_mem_save_ORPCthat_0;
784         if (flags & NDR_IN) {
785                 ZERO_STRUCT(r->out);
786
787                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
788                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
789                 ZERO_STRUCTP(r->out.ORPCthat);
790         }
791         if (flags & NDR_OUT) {
792                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
793                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
794                 }
795                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
796                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
797                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
798                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
799                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
800         }
801         return NDR_ERR_SUCCESS;
802 }
803
804 _PUBLIC_ void ndr_print_RemoteLockServer(struct ndr_print *ndr, const char *name, int flags, const struct RemoteLockServer *r)
805 {
806         ndr_print_struct(ndr, name, "RemoteLockServer");
807         ndr->depth++;
808         if (flags & NDR_SET_VALUES) {
809                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
810         }
811         if (flags & NDR_IN) {
812                 ndr_print_struct(ndr, "in", "RemoteLockServer");
813                 ndr->depth++;
814                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
815                 ndr->depth--;
816         }
817         if (flags & NDR_OUT) {
818                 ndr_print_struct(ndr, "out", "RemoteLockServer");
819                 ndr->depth++;
820                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
821                 ndr->depth++;
822                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
823                 ndr->depth--;
824                 ndr_print_WERROR(ndr, "result", r->out.result);
825                 ndr->depth--;
826         }
827         ndr->depth--;
828 }
829
830 static const struct ndr_interface_call IClassFactory_calls[] = {
831         {
832                 "CreateInstance",
833                 sizeof(struct CreateInstance),
834                 (ndr_push_flags_fn_t) ndr_push_CreateInstance,
835                 (ndr_pull_flags_fn_t) ndr_pull_CreateInstance,
836                 (ndr_print_function_t) ndr_print_CreateInstance,
837                 false,
838         },
839         {
840                 "RemoteCreateInstance",
841                 sizeof(struct RemoteCreateInstance),
842                 (ndr_push_flags_fn_t) ndr_push_RemoteCreateInstance,
843                 (ndr_pull_flags_fn_t) ndr_pull_RemoteCreateInstance,
844                 (ndr_print_function_t) ndr_print_RemoteCreateInstance,
845                 false,
846         },
847         {
848                 "LockServer",
849                 sizeof(struct LockServer),
850                 (ndr_push_flags_fn_t) ndr_push_LockServer,
851                 (ndr_pull_flags_fn_t) ndr_pull_LockServer,
852                 (ndr_print_function_t) ndr_print_LockServer,
853                 false,
854         },
855         {
856                 "RemoteLockServer",
857                 sizeof(struct RemoteLockServer),
858                 (ndr_push_flags_fn_t) ndr_push_RemoteLockServer,
859                 (ndr_pull_flags_fn_t) ndr_pull_RemoteLockServer,
860                 (ndr_print_function_t) ndr_print_RemoteLockServer,
861                 false,
862         },
863         { NULL, 0, NULL, NULL, NULL, false }
864 };
865
866 static const char * const IClassFactory_endpoint_strings[] = {
867         "ncacn_np:[\\pipe\\IClassFactory]", 
868 };
869
870 static const struct ndr_interface_string_array IClassFactory_endpoints = {
871         .count  = 1,
872         .names  = IClassFactory_endpoint_strings
873 };
874
875 static const char * const IClassFactory_authservice_strings[] = {
876         "host", 
877 };
878
879 static const struct ndr_interface_string_array IClassFactory_authservices = {
880         .count  = 1,
881         .names  = IClassFactory_authservice_strings
882 };
883
884
885 const struct ndr_interface_table ndr_table_IClassFactory = {
886         .name           = "IClassFactory",
887         .syntax_id      = {
888                 {0x00000001,0x0000,0x0000,{0xc0,0x00},{0x00,0x00,0x00,0x00,0x00,0x46}},
889                 NDR_ICLASSFACTORY_VERSION
890         },
891         .helpstring     = NDR_ICLASSFACTORY_HELPSTRING,
892         .num_calls      = 4,
893         .calls          = IClassFactory_calls,
894         .endpoints      = &IClassFactory_endpoints,
895         .authservices   = &IClassFactory_authservices
896 };
897
898 #include "librpc/gen_ndr/ndr_orpc.h"
899 _PUBLIC_ enum ndr_err_code ndr_push_REMQIRESULT(struct ndr_push *ndr, int ndr_flags, const struct REMQIRESULT *r)
900 {
901         if (ndr_flags & NDR_SCALARS) {
902                 NDR_CHECK(ndr_push_align(ndr, 4));
903                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->hResult));
904                 NDR_CHECK(ndr_push_STDOBJREF(ndr, NDR_SCALARS, &r->std));
905                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
906         }
907         if (ndr_flags & NDR_BUFFERS) {
908                 NDR_CHECK(ndr_push_STDOBJREF(ndr, NDR_BUFFERS, &r->std));
909         }
910         return NDR_ERR_SUCCESS;
911 }
912
913 _PUBLIC_ enum ndr_err_code ndr_pull_REMQIRESULT(struct ndr_pull *ndr, int ndr_flags, struct REMQIRESULT *r)
914 {
915         if (ndr_flags & NDR_SCALARS) {
916                 NDR_CHECK(ndr_pull_align(ndr, 4));
917                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->hResult));
918                 NDR_CHECK(ndr_pull_STDOBJREF(ndr, NDR_SCALARS, &r->std));
919                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
920         }
921         if (ndr_flags & NDR_BUFFERS) {
922                 NDR_CHECK(ndr_pull_STDOBJREF(ndr, NDR_BUFFERS, &r->std));
923         }
924         return NDR_ERR_SUCCESS;
925 }
926
927 _PUBLIC_ void ndr_print_REMQIRESULT(struct ndr_print *ndr, const char *name, const struct REMQIRESULT *r)
928 {
929         ndr_print_struct(ndr, name, "REMQIRESULT");
930         ndr->depth++;
931         ndr_print_WERROR(ndr, "hResult", r->hResult);
932         ndr_print_STDOBJREF(ndr, "std", &r->std);
933         ndr->depth--;
934 }
935
936 static enum ndr_err_code ndr_push_REMINTERFACEREF(struct ndr_push *ndr, int ndr_flags, const struct REMINTERFACEREF *r)
937 {
938         if (ndr_flags & NDR_SCALARS) {
939                 NDR_CHECK(ndr_push_align(ndr, 4));
940                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->ipid));
941                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cPublicRefs));
942                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cPrivateRefs));
943                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
944         }
945         if (ndr_flags & NDR_BUFFERS) {
946         }
947         return NDR_ERR_SUCCESS;
948 }
949
950 static enum ndr_err_code ndr_pull_REMINTERFACEREF(struct ndr_pull *ndr, int ndr_flags, struct REMINTERFACEREF *r)
951 {
952         if (ndr_flags & NDR_SCALARS) {
953                 NDR_CHECK(ndr_pull_align(ndr, 4));
954                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->ipid));
955                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cPublicRefs));
956                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cPrivateRefs));
957                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
958         }
959         if (ndr_flags & NDR_BUFFERS) {
960         }
961         return NDR_ERR_SUCCESS;
962 }
963
964 _PUBLIC_ void ndr_print_REMINTERFACEREF(struct ndr_print *ndr, const char *name, const struct REMINTERFACEREF *r)
965 {
966         ndr_print_struct(ndr, name, "REMINTERFACEREF");
967         ndr->depth++;
968         ndr_print_GUID(ndr, "ipid", &r->ipid);
969         ndr_print_uint32(ndr, "cPublicRefs", r->cPublicRefs);
970         ndr_print_uint32(ndr, "cPrivateRefs", r->cPrivateRefs);
971         ndr->depth--;
972 }
973
974 static enum ndr_err_code ndr_push_RemQueryInterface(struct ndr_push *ndr, int flags, const struct RemQueryInterface *r)
975 {
976         uint32_t cntr_iids_1;
977         uint32_t cntr_ip_1;
978         if (flags & NDR_IN) {
979                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
980                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ripid));
981                 if (r->in.ripid) {
982                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.ripid));
983                 }
984                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cRefs));
985                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.cIids));
986                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.iids));
987                 if (r->in.iids) {
988                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cIids));
989                         for (cntr_iids_1 = 0; cntr_iids_1 < r->in.cIids; cntr_iids_1++) {
990                                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->in.iids[cntr_iids_1]));
991                         }
992                 }
993         }
994         if (flags & NDR_OUT) {
995                 if (r->out.ORPCthat == NULL) {
996                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
997                 }
998                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
999                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.ip));
1000                 if (r->out.ip) {
1001                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cIids));
1002                         for (cntr_ip_1 = 0; cntr_ip_1 < r->in.cIids; cntr_ip_1++) {
1003                                 NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_SCALARS, &r->out.ip[cntr_ip_1]));
1004                         }
1005                         for (cntr_ip_1 = 0; cntr_ip_1 < r->in.cIids; cntr_ip_1++) {
1006                                 NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_BUFFERS, &r->out.ip[cntr_ip_1]));
1007                         }
1008                 }
1009                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1010         }
1011         return NDR_ERR_SUCCESS;
1012 }
1013
1014 static enum ndr_err_code ndr_pull_RemQueryInterface(struct ndr_pull *ndr, int flags, struct RemQueryInterface *r)
1015 {
1016         uint32_t _ptr_ripid;
1017         uint32_t _ptr_iids;
1018         uint32_t cntr_iids_1;
1019         uint32_t _ptr_ip;
1020         uint32_t cntr_ip_1;
1021         TALLOC_CTX *_mem_save_ORPCthat_0;
1022         TALLOC_CTX *_mem_save_ripid_0;
1023         TALLOC_CTX *_mem_save_iids_0;
1024         TALLOC_CTX *_mem_save_iids_1;
1025         TALLOC_CTX *_mem_save_ip_0;
1026         TALLOC_CTX *_mem_save_ip_1;
1027         if (flags & NDR_IN) {
1028                 ZERO_STRUCT(r->out);
1029
1030                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
1031                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ripid));
1032                 if (_ptr_ripid) {
1033                         NDR_PULL_ALLOC(ndr, r->in.ripid);
1034                 } else {
1035                         r->in.ripid = NULL;
1036                 }
1037                 if (r->in.ripid) {
1038                         _mem_save_ripid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1039                         NDR_PULL_SET_MEM_CTX(ndr, r->in.ripid, 0);
1040                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.ripid));
1041                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ripid_0, 0);
1042                 }
1043                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cRefs));
1044                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.cIids));
1045                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_iids));
1046                 if (_ptr_iids) {
1047                         NDR_PULL_ALLOC(ndr, r->in.iids);
1048                 } else {
1049                         r->in.iids = NULL;
1050                 }
1051                 if (r->in.iids) {
1052                         _mem_save_iids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1053                         NDR_PULL_SET_MEM_CTX(ndr, r->in.iids, 0);
1054                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.iids));
1055                         NDR_PULL_ALLOC_N(ndr, r->in.iids, ndr_get_array_size(ndr, &r->in.iids));
1056                         _mem_save_iids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1057                         NDR_PULL_SET_MEM_CTX(ndr, r->in.iids, 0);
1058                         for (cntr_iids_1 = 0; cntr_iids_1 < r->in.cIids; cntr_iids_1++) {
1059                                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->in.iids[cntr_iids_1]));
1060                         }
1061                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_iids_1, 0);
1062                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_iids_0, 0);
1063                 }
1064                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1065                 ZERO_STRUCTP(r->out.ORPCthat);
1066                 if (r->in.iids) {
1067                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.iids, r->in.cIids));
1068                 }
1069         }
1070         if (flags & NDR_OUT) {
1071                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1072                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1073                 }
1074                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
1075                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
1076                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
1077                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
1078                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ip));
1079                 if (_ptr_ip) {
1080                         NDR_PULL_ALLOC(ndr, r->out.ip);
1081                 } else {
1082                         r->out.ip = NULL;
1083                 }
1084                 if (r->out.ip) {
1085                         _mem_save_ip_0 = NDR_PULL_GET_MEM_CTX(ndr);
1086                         NDR_PULL_SET_MEM_CTX(ndr, r->out.ip, 0);
1087                         NDR_CHECK(ndr_pull_array_size(ndr, &r->out.ip));
1088                         NDR_PULL_ALLOC_N(ndr, r->out.ip, ndr_get_array_size(ndr, &r->out.ip));
1089                         _mem_save_ip_1 = NDR_PULL_GET_MEM_CTX(ndr);
1090                         NDR_PULL_SET_MEM_CTX(ndr, r->out.ip, 0);
1091                         for (cntr_ip_1 = 0; cntr_ip_1 < r->in.cIids; cntr_ip_1++) {
1092                                 NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS, &r->out.ip[cntr_ip_1]));
1093                         }
1094                         for (cntr_ip_1 = 0; cntr_ip_1 < r->in.cIids; cntr_ip_1++) {
1095                                 NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_BUFFERS, &r->out.ip[cntr_ip_1]));
1096                         }
1097                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ip_1, 0);
1098                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ip_0, 0);
1099                 }
1100                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1101                 if (r->out.ip) {
1102                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.ip, r->in.cIids));
1103                 }
1104         }
1105         return NDR_ERR_SUCCESS;
1106 }
1107
1108 _PUBLIC_ void ndr_print_RemQueryInterface(struct ndr_print *ndr, const char *name, int flags, const struct RemQueryInterface *r)
1109 {
1110         uint32_t cntr_iids_1;
1111         uint32_t cntr_ip_1;
1112         ndr_print_struct(ndr, name, "RemQueryInterface");
1113         ndr->depth++;
1114         if (flags & NDR_SET_VALUES) {
1115                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1116         }
1117         if (flags & NDR_IN) {
1118                 ndr_print_struct(ndr, "in", "RemQueryInterface");
1119                 ndr->depth++;
1120                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
1121                 ndr_print_ptr(ndr, "ripid", r->in.ripid);
1122                 ndr->depth++;
1123                 if (r->in.ripid) {
1124                         ndr_print_GUID(ndr, "ripid", r->in.ripid);
1125                 }
1126                 ndr->depth--;
1127                 ndr_print_uint32(ndr, "cRefs", r->in.cRefs);
1128                 ndr_print_uint16(ndr, "cIids", r->in.cIids);
1129                 ndr_print_ptr(ndr, "iids", r->in.iids);
1130                 ndr->depth++;
1131                 if (r->in.iids) {
1132                         ndr->print(ndr, "%s: ARRAY(%d)", "iids", (int)r->in.cIids);
1133                         ndr->depth++;
1134                         for (cntr_iids_1=0;cntr_iids_1<r->in.cIids;cntr_iids_1++) {
1135                                 char *idx_1=NULL;
1136                                 if (asprintf(&idx_1, "[%d]", cntr_iids_1) != -1) {
1137                                         ndr_print_GUID(ndr, "iids", &r->in.iids[cntr_iids_1]);
1138                                         free(idx_1);
1139                                 }
1140                         }
1141                         ndr->depth--;
1142                 }
1143                 ndr->depth--;
1144                 ndr->depth--;
1145         }
1146         if (flags & NDR_OUT) {
1147                 ndr_print_struct(ndr, "out", "RemQueryInterface");
1148                 ndr->depth++;
1149                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
1150                 ndr->depth++;
1151                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
1152                 ndr->depth--;
1153                 ndr_print_ptr(ndr, "ip", r->out.ip);
1154                 ndr->depth++;
1155                 if (r->out.ip) {
1156                         ndr->print(ndr, "%s: ARRAY(%d)", "ip", (int)r->in.cIids);
1157                         ndr->depth++;
1158                         for (cntr_ip_1=0;cntr_ip_1<r->in.cIids;cntr_ip_1++) {
1159                                 char *idx_1=NULL;
1160                                 if (asprintf(&idx_1, "[%d]", cntr_ip_1) != -1) {
1161                                         ndr_print_MInterfacePointer(ndr, "ip", &r->out.ip[cntr_ip_1]);
1162                                         free(idx_1);
1163                                 }
1164                         }
1165                         ndr->depth--;
1166                 }
1167                 ndr->depth--;
1168                 ndr_print_WERROR(ndr, "result", r->out.result);
1169                 ndr->depth--;
1170         }
1171         ndr->depth--;
1172 }
1173
1174 static enum ndr_err_code ndr_push_RemAddRef(struct ndr_push *ndr, int flags, const struct RemAddRef *r)
1175 {
1176         uint32_t cntr_InterfaceRefs_0;
1177         uint32_t cntr_pResults_1;
1178         if (flags & NDR_IN) {
1179                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
1180                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.cInterfaceRefs));
1181                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cInterfaceRefs));
1182                 for (cntr_InterfaceRefs_0 = 0; cntr_InterfaceRefs_0 < r->in.cInterfaceRefs; cntr_InterfaceRefs_0++) {
1183                         NDR_CHECK(ndr_push_REMINTERFACEREF(ndr, NDR_SCALARS, &r->in.InterfaceRefs[cntr_InterfaceRefs_0]));
1184                 }
1185         }
1186         if (flags & NDR_OUT) {
1187                 if (r->out.ORPCthat == NULL) {
1188                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1189                 }
1190                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
1191                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pResults));
1192                 if (r->out.pResults) {
1193                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cInterfaceRefs));
1194                         for (cntr_pResults_1 = 0; cntr_pResults_1 < r->in.cInterfaceRefs; cntr_pResults_1++) {
1195                                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.pResults[cntr_pResults_1]));
1196                         }
1197                 }
1198                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1199         }
1200         return NDR_ERR_SUCCESS;
1201 }
1202
1203 static enum ndr_err_code ndr_pull_RemAddRef(struct ndr_pull *ndr, int flags, struct RemAddRef *r)
1204 {
1205         uint32_t cntr_InterfaceRefs_0;
1206         uint32_t _ptr_pResults;
1207         uint32_t cntr_pResults_1;
1208         TALLOC_CTX *_mem_save_ORPCthat_0;
1209         TALLOC_CTX *_mem_save_InterfaceRefs_0;
1210         TALLOC_CTX *_mem_save_pResults_0;
1211         TALLOC_CTX *_mem_save_pResults_1;
1212         if (flags & NDR_IN) {
1213                 ZERO_STRUCT(r->out);
1214
1215                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
1216                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.cInterfaceRefs));
1217                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.InterfaceRefs));
1218                 NDR_PULL_ALLOC_N(ndr, r->in.InterfaceRefs, ndr_get_array_size(ndr, &r->in.InterfaceRefs));
1219                 _mem_save_InterfaceRefs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1220                 NDR_PULL_SET_MEM_CTX(ndr, r->in.InterfaceRefs, 0);
1221                 for (cntr_InterfaceRefs_0 = 0; cntr_InterfaceRefs_0 < r->in.cInterfaceRefs; cntr_InterfaceRefs_0++) {
1222                         NDR_CHECK(ndr_pull_REMINTERFACEREF(ndr, NDR_SCALARS, &r->in.InterfaceRefs[cntr_InterfaceRefs_0]));
1223                 }
1224                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_InterfaceRefs_0, 0);
1225                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1226                 ZERO_STRUCTP(r->out.ORPCthat);
1227                 if (r->in.InterfaceRefs) {
1228                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.InterfaceRefs, r->in.cInterfaceRefs));
1229                 }
1230         }
1231         if (flags & NDR_OUT) {
1232                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1233                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1234                 }
1235                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
1236                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
1237                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
1238                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
1239                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pResults));
1240                 if (_ptr_pResults) {
1241                         NDR_PULL_ALLOC(ndr, r->out.pResults);
1242                 } else {
1243                         r->out.pResults = NULL;
1244                 }
1245                 if (r->out.pResults) {
1246                         _mem_save_pResults_0 = NDR_PULL_GET_MEM_CTX(ndr);
1247                         NDR_PULL_SET_MEM_CTX(ndr, r->out.pResults, 0);
1248                         NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pResults));
1249                         NDR_PULL_ALLOC_N(ndr, r->out.pResults, ndr_get_array_size(ndr, &r->out.pResults));
1250                         _mem_save_pResults_1 = NDR_PULL_GET_MEM_CTX(ndr);
1251                         NDR_PULL_SET_MEM_CTX(ndr, r->out.pResults, 0);
1252                         for (cntr_pResults_1 = 0; cntr_pResults_1 < r->in.cInterfaceRefs; cntr_pResults_1++) {
1253                                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.pResults[cntr_pResults_1]));
1254                         }
1255                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pResults_1, 0);
1256                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pResults_0, 0);
1257                 }
1258                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1259                 if (r->out.pResults) {
1260                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.pResults, r->in.cInterfaceRefs));
1261                 }
1262         }
1263         return NDR_ERR_SUCCESS;
1264 }
1265
1266 _PUBLIC_ void ndr_print_RemAddRef(struct ndr_print *ndr, const char *name, int flags, const struct RemAddRef *r)
1267 {
1268         uint32_t cntr_InterfaceRefs_0;
1269         uint32_t cntr_pResults_1;
1270         ndr_print_struct(ndr, name, "RemAddRef");
1271         ndr->depth++;
1272         if (flags & NDR_SET_VALUES) {
1273                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1274         }
1275         if (flags & NDR_IN) {
1276                 ndr_print_struct(ndr, "in", "RemAddRef");
1277                 ndr->depth++;
1278                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
1279                 ndr_print_uint16(ndr, "cInterfaceRefs", r->in.cInterfaceRefs);
1280                 ndr->print(ndr, "%s: ARRAY(%d)", "InterfaceRefs", (int)r->in.cInterfaceRefs);
1281                 ndr->depth++;
1282                 for (cntr_InterfaceRefs_0=0;cntr_InterfaceRefs_0<r->in.cInterfaceRefs;cntr_InterfaceRefs_0++) {
1283                         char *idx_0=NULL;
1284                         if (asprintf(&idx_0, "[%d]", cntr_InterfaceRefs_0) != -1) {
1285                                 ndr_print_REMINTERFACEREF(ndr, "InterfaceRefs", &r->in.InterfaceRefs[cntr_InterfaceRefs_0]);
1286                                 free(idx_0);
1287                         }
1288                 }
1289                 ndr->depth--;
1290                 ndr->depth--;
1291         }
1292         if (flags & NDR_OUT) {
1293                 ndr_print_struct(ndr, "out", "RemAddRef");
1294                 ndr->depth++;
1295                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
1296                 ndr->depth++;
1297                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
1298                 ndr->depth--;
1299                 ndr_print_ptr(ndr, "pResults", r->out.pResults);
1300                 ndr->depth++;
1301                 if (r->out.pResults) {
1302                         ndr->print(ndr, "%s: ARRAY(%d)", "pResults", (int)r->in.cInterfaceRefs);
1303                         ndr->depth++;
1304                         for (cntr_pResults_1=0;cntr_pResults_1<r->in.cInterfaceRefs;cntr_pResults_1++) {
1305                                 char *idx_1=NULL;
1306                                 if (asprintf(&idx_1, "[%d]", cntr_pResults_1) != -1) {
1307                                         ndr_print_WERROR(ndr, "pResults", r->out.pResults[cntr_pResults_1]);
1308                                         free(idx_1);
1309                                 }
1310                         }
1311                         ndr->depth--;
1312                 }
1313                 ndr->depth--;
1314                 ndr_print_WERROR(ndr, "result", r->out.result);
1315                 ndr->depth--;
1316         }
1317         ndr->depth--;
1318 }
1319
1320 static enum ndr_err_code ndr_push_RemRelease(struct ndr_push *ndr, int flags, const struct RemRelease *r)
1321 {
1322         uint32_t cntr_InterfaceRefs_0;
1323         if (flags & NDR_IN) {
1324                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
1325                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.cInterfaceRefs));
1326                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cInterfaceRefs));
1327                 for (cntr_InterfaceRefs_0 = 0; cntr_InterfaceRefs_0 < r->in.cInterfaceRefs; cntr_InterfaceRefs_0++) {
1328                         NDR_CHECK(ndr_push_REMINTERFACEREF(ndr, NDR_SCALARS, &r->in.InterfaceRefs[cntr_InterfaceRefs_0]));
1329                 }
1330         }
1331         if (flags & NDR_OUT) {
1332                 if (r->out.ORPCthat == NULL) {
1333                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1334                 }
1335                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
1336                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1337         }
1338         return NDR_ERR_SUCCESS;
1339 }
1340
1341 static enum ndr_err_code ndr_pull_RemRelease(struct ndr_pull *ndr, int flags, struct RemRelease *r)
1342 {
1343         uint32_t cntr_InterfaceRefs_0;
1344         TALLOC_CTX *_mem_save_ORPCthat_0;
1345         TALLOC_CTX *_mem_save_InterfaceRefs_0;
1346         if (flags & NDR_IN) {
1347                 ZERO_STRUCT(r->out);
1348
1349                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
1350                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.cInterfaceRefs));
1351                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.InterfaceRefs));
1352                 NDR_PULL_ALLOC_N(ndr, r->in.InterfaceRefs, ndr_get_array_size(ndr, &r->in.InterfaceRefs));
1353                 _mem_save_InterfaceRefs_0 = NDR_PULL_GET_MEM_CTX(ndr);
1354                 NDR_PULL_SET_MEM_CTX(ndr, r->in.InterfaceRefs, 0);
1355                 for (cntr_InterfaceRefs_0 = 0; cntr_InterfaceRefs_0 < r->in.cInterfaceRefs; cntr_InterfaceRefs_0++) {
1356                         NDR_CHECK(ndr_pull_REMINTERFACEREF(ndr, NDR_SCALARS, &r->in.InterfaceRefs[cntr_InterfaceRefs_0]));
1357                 }
1358                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_InterfaceRefs_0, 0);
1359                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1360                 ZERO_STRUCTP(r->out.ORPCthat);
1361                 if (r->in.InterfaceRefs) {
1362                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.InterfaceRefs, r->in.cInterfaceRefs));
1363                 }
1364         }
1365         if (flags & NDR_OUT) {
1366                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1367                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1368                 }
1369                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
1370                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
1371                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
1372                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
1373                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1374         }
1375         return NDR_ERR_SUCCESS;
1376 }
1377
1378 _PUBLIC_ void ndr_print_RemRelease(struct ndr_print *ndr, const char *name, int flags, const struct RemRelease *r)
1379 {
1380         uint32_t cntr_InterfaceRefs_0;
1381         ndr_print_struct(ndr, name, "RemRelease");
1382         ndr->depth++;
1383         if (flags & NDR_SET_VALUES) {
1384                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1385         }
1386         if (flags & NDR_IN) {
1387                 ndr_print_struct(ndr, "in", "RemRelease");
1388                 ndr->depth++;
1389                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
1390                 ndr_print_uint16(ndr, "cInterfaceRefs", r->in.cInterfaceRefs);
1391                 ndr->print(ndr, "%s: ARRAY(%d)", "InterfaceRefs", (int)r->in.cInterfaceRefs);
1392                 ndr->depth++;
1393                 for (cntr_InterfaceRefs_0=0;cntr_InterfaceRefs_0<r->in.cInterfaceRefs;cntr_InterfaceRefs_0++) {
1394                         char *idx_0=NULL;
1395                         if (asprintf(&idx_0, "[%d]", cntr_InterfaceRefs_0) != -1) {
1396                                 ndr_print_REMINTERFACEREF(ndr, "InterfaceRefs", &r->in.InterfaceRefs[cntr_InterfaceRefs_0]);
1397                                 free(idx_0);
1398                         }
1399                 }
1400                 ndr->depth--;
1401                 ndr->depth--;
1402         }
1403         if (flags & NDR_OUT) {
1404                 ndr_print_struct(ndr, "out", "RemRelease");
1405                 ndr->depth++;
1406                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
1407                 ndr->depth++;
1408                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
1409                 ndr->depth--;
1410                 ndr_print_WERROR(ndr, "result", r->out.result);
1411                 ndr->depth--;
1412         }
1413         ndr->depth--;
1414 }
1415
1416 static const struct ndr_interface_call IRemUnknown_calls[] = {
1417         {
1418                 "RemQueryInterface",
1419                 sizeof(struct RemQueryInterface),
1420                 (ndr_push_flags_fn_t) ndr_push_RemQueryInterface,
1421                 (ndr_pull_flags_fn_t) ndr_pull_RemQueryInterface,
1422                 (ndr_print_function_t) ndr_print_RemQueryInterface,
1423                 false,
1424         },
1425         {
1426                 "RemAddRef",
1427                 sizeof(struct RemAddRef),
1428                 (ndr_push_flags_fn_t) ndr_push_RemAddRef,
1429                 (ndr_pull_flags_fn_t) ndr_pull_RemAddRef,
1430                 (ndr_print_function_t) ndr_print_RemAddRef,
1431                 false,
1432         },
1433         {
1434                 "RemRelease",
1435                 sizeof(struct RemRelease),
1436                 (ndr_push_flags_fn_t) ndr_push_RemRelease,
1437                 (ndr_pull_flags_fn_t) ndr_pull_RemRelease,
1438                 (ndr_print_function_t) ndr_print_RemRelease,
1439                 false,
1440         },
1441         { NULL, 0, NULL, NULL, NULL, false }
1442 };
1443
1444 static const char * const IRemUnknown_endpoint_strings[] = {
1445         "ncacn_np:[\\pipe\\IRemUnknown]", 
1446 };
1447
1448 static const struct ndr_interface_string_array IRemUnknown_endpoints = {
1449         .count  = 1,
1450         .names  = IRemUnknown_endpoint_strings
1451 };
1452
1453 static const char * const IRemUnknown_authservice_strings[] = {
1454         "host", 
1455 };
1456
1457 static const struct ndr_interface_string_array IRemUnknown_authservices = {
1458         .count  = 1,
1459         .names  = IRemUnknown_authservice_strings
1460 };
1461
1462
1463 const struct ndr_interface_table ndr_table_IRemUnknown = {
1464         .name           = "IRemUnknown",
1465         .syntax_id      = {
1466                 {0x00000131,0x0000,0x0000,{0xc0,0x00},{0x00,0x00,0x00,0x00,0x00,0x46}},
1467                 NDR_IREMUNKNOWN_VERSION
1468         },
1469         .helpstring     = NDR_IREMUNKNOWN_HELPSTRING,
1470         .num_calls      = 3,
1471         .calls          = IRemUnknown_calls,
1472         .endpoints      = &IRemUnknown_endpoints,
1473         .authservices   = &IRemUnknown_authservices
1474 };
1475
1476 #include "librpc/gen_ndr/ndr_orpc.h"
1477 static enum ndr_err_code ndr_push_GetClassObject(struct ndr_push *ndr, int flags, const struct GetClassObject *r)
1478 {
1479         if (flags & NDR_IN) {
1480                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
1481                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->in.clsid));
1482                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.context));
1483                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.locale));
1484                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->in.iid));
1485         }
1486         if (flags & NDR_OUT) {
1487                 if (r->out.ORPCthat == NULL) {
1488                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1489                 }
1490                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
1491                 if (r->out.data == NULL) {
1492                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1493                 }
1494                 NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data));
1495         }
1496         return NDR_ERR_SUCCESS;
1497 }
1498
1499 static enum ndr_err_code ndr_pull_GetClassObject(struct ndr_pull *ndr, int flags, struct GetClassObject *r)
1500 {
1501         TALLOC_CTX *_mem_save_ORPCthat_0;
1502         TALLOC_CTX *_mem_save_data_0;
1503         if (flags & NDR_IN) {
1504                 ZERO_STRUCT(r->out);
1505
1506                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
1507                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->in.clsid));
1508                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.context));
1509                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.locale));
1510                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->in.iid));
1511                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1512                 ZERO_STRUCTP(r->out.ORPCthat);
1513                 NDR_PULL_ALLOC(ndr, r->out.data);
1514                 ZERO_STRUCTP(r->out.data);
1515         }
1516         if (flags & NDR_OUT) {
1517                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1518                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1519                 }
1520                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
1521                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
1522                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
1523                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
1524                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1525                         NDR_PULL_ALLOC(ndr, r->out.data);
1526                 }
1527                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1528                 NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC);
1529                 NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data));
1530                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
1531         }
1532         return NDR_ERR_SUCCESS;
1533 }
1534
1535 _PUBLIC_ void ndr_print_GetClassObject(struct ndr_print *ndr, const char *name, int flags, const struct GetClassObject *r)
1536 {
1537         ndr_print_struct(ndr, name, "GetClassObject");
1538         ndr->depth++;
1539         if (flags & NDR_SET_VALUES) {
1540                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1541         }
1542         if (flags & NDR_IN) {
1543                 ndr_print_struct(ndr, "in", "GetClassObject");
1544                 ndr->depth++;
1545                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
1546                 ndr_print_GUID(ndr, "clsid", &r->in.clsid);
1547                 ndr_print_uint32(ndr, "context", r->in.context);
1548                 ndr_print_uint32(ndr, "locale", r->in.locale);
1549                 ndr_print_GUID(ndr, "iid", &r->in.iid);
1550                 ndr->depth--;
1551         }
1552         if (flags & NDR_OUT) {
1553                 ndr_print_struct(ndr, "out", "GetClassObject");
1554                 ndr->depth++;
1555                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
1556                 ndr->depth++;
1557                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
1558                 ndr->depth--;
1559                 ndr_print_ptr(ndr, "data", r->out.data);
1560                 ndr->depth++;
1561                 ndr_print_MInterfacePointer(ndr, "data", r->out.data);
1562                 ndr->depth--;
1563                 ndr->depth--;
1564         }
1565         ndr->depth--;
1566 }
1567
1568 static const struct ndr_interface_call IClassActivator_calls[] = {
1569         {
1570                 "GetClassObject",
1571                 sizeof(struct GetClassObject),
1572                 (ndr_push_flags_fn_t) ndr_push_GetClassObject,
1573                 (ndr_pull_flags_fn_t) ndr_pull_GetClassObject,
1574                 (ndr_print_function_t) ndr_print_GetClassObject,
1575                 false,
1576         },
1577         { NULL, 0, NULL, NULL, NULL, false }
1578 };
1579
1580 static const char * const IClassActivator_endpoint_strings[] = {
1581         "ncacn_np:[\\pipe\\IClassActivator]", 
1582 };
1583
1584 static const struct ndr_interface_string_array IClassActivator_endpoints = {
1585         .count  = 1,
1586         .names  = IClassActivator_endpoint_strings
1587 };
1588
1589 static const char * const IClassActivator_authservice_strings[] = {
1590         "host", 
1591 };
1592
1593 static const struct ndr_interface_string_array IClassActivator_authservices = {
1594         .count  = 1,
1595         .names  = IClassActivator_authservice_strings
1596 };
1597
1598
1599 const struct ndr_interface_table ndr_table_IClassActivator = {
1600         .name           = "IClassActivator",
1601         .syntax_id      = {
1602                 {0x00000140,0x0000,0x0000,{0xc0,0x00},{0x00,0x00,0x00,0x00,0x00,0x46}},
1603                 NDR_ICLASSACTIVATOR_VERSION
1604         },
1605         .helpstring     = NDR_ICLASSACTIVATOR_HELPSTRING,
1606         .num_calls      = 1,
1607         .calls          = IClassActivator_calls,
1608         .endpoints      = &IClassActivator_endpoints,
1609         .authservices   = &IClassActivator_authservices
1610 };
1611
1612 #include "librpc/gen_ndr/ndr_orpc.h"
1613 static enum ndr_err_code ndr_push_ISCMLocalActivator_CreateInstance(struct ndr_push *ndr, int flags, const struct ISCMLocalActivator_CreateInstance *r)
1614 {
1615         if (flags & NDR_IN) {
1616                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
1617         }
1618         if (flags & NDR_OUT) {
1619                 if (r->out.ORPCthat == NULL) {
1620                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1621                 }
1622                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
1623                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1624         }
1625         return NDR_ERR_SUCCESS;
1626 }
1627
1628 static enum ndr_err_code ndr_pull_ISCMLocalActivator_CreateInstance(struct ndr_pull *ndr, int flags, struct ISCMLocalActivator_CreateInstance *r)
1629 {
1630         TALLOC_CTX *_mem_save_ORPCthat_0;
1631         if (flags & NDR_IN) {
1632                 ZERO_STRUCT(r->out);
1633
1634                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
1635                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1636                 ZERO_STRUCTP(r->out.ORPCthat);
1637         }
1638         if (flags & NDR_OUT) {
1639                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1640                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1641                 }
1642                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
1643                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
1644                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
1645                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
1646                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1647         }
1648         return NDR_ERR_SUCCESS;
1649 }
1650
1651 _PUBLIC_ void ndr_print_ISCMLocalActivator_CreateInstance(struct ndr_print *ndr, const char *name, int flags, const struct ISCMLocalActivator_CreateInstance *r)
1652 {
1653         ndr_print_struct(ndr, name, "ISCMLocalActivator_CreateInstance");
1654         ndr->depth++;
1655         if (flags & NDR_SET_VALUES) {
1656                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1657         }
1658         if (flags & NDR_IN) {
1659                 ndr_print_struct(ndr, "in", "ISCMLocalActivator_CreateInstance");
1660                 ndr->depth++;
1661                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
1662                 ndr->depth--;
1663         }
1664         if (flags & NDR_OUT) {
1665                 ndr_print_struct(ndr, "out", "ISCMLocalActivator_CreateInstance");
1666                 ndr->depth++;
1667                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
1668                 ndr->depth++;
1669                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
1670                 ndr->depth--;
1671                 ndr_print_WERROR(ndr, "result", r->out.result);
1672                 ndr->depth--;
1673         }
1674         ndr->depth--;
1675 }
1676
1677 static const struct ndr_interface_call ISCMLocalActivator_calls[] = {
1678         {
1679                 "ISCMLocalActivator_CreateInstance",
1680                 sizeof(struct ISCMLocalActivator_CreateInstance),
1681                 (ndr_push_flags_fn_t) ndr_push_ISCMLocalActivator_CreateInstance,
1682                 (ndr_pull_flags_fn_t) ndr_pull_ISCMLocalActivator_CreateInstance,
1683                 (ndr_print_function_t) ndr_print_ISCMLocalActivator_CreateInstance,
1684                 false,
1685         },
1686         { NULL, 0, NULL, NULL, NULL, false }
1687 };
1688
1689 static const char * const ISCMLocalActivator_endpoint_strings[] = {
1690         "ncacn_np:[\\pipe\\ISCMLocalActivator]", 
1691 };
1692
1693 static const struct ndr_interface_string_array ISCMLocalActivator_endpoints = {
1694         .count  = 1,
1695         .names  = ISCMLocalActivator_endpoint_strings
1696 };
1697
1698 static const char * const ISCMLocalActivator_authservice_strings[] = {
1699         "host", 
1700 };
1701
1702 static const struct ndr_interface_string_array ISCMLocalActivator_authservices = {
1703         .count  = 1,
1704         .names  = ISCMLocalActivator_authservice_strings
1705 };
1706
1707
1708 const struct ndr_interface_table ndr_table_ISCMLocalActivator = {
1709         .name           = "ISCMLocalActivator",
1710         .syntax_id      = {
1711                 {0x00000136,0x0000,0x0000,{0xc0,0x00},{0x00,0x00,0x00,0x00,0x00,0x46}},
1712                 NDR_ISCMLOCALACTIVATOR_VERSION
1713         },
1714         .helpstring     = NDR_ISCMLOCALACTIVATOR_HELPSTRING,
1715         .num_calls      = 1,
1716         .calls          = ISCMLocalActivator_calls,
1717         .endpoints      = &ISCMLocalActivator_endpoints,
1718         .authservices   = &ISCMLocalActivator_authservices
1719 };
1720
1721 static enum ndr_err_code ndr_push_IMachineLocalActivator_foo(struct ndr_push *ndr, int flags, const struct IMachineLocalActivator_foo *r)
1722 {
1723         if (flags & NDR_IN) {
1724         }
1725         if (flags & NDR_OUT) {
1726                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1727         }
1728         return NDR_ERR_SUCCESS;
1729 }
1730
1731 static enum ndr_err_code ndr_pull_IMachineLocalActivator_foo(struct ndr_pull *ndr, int flags, struct IMachineLocalActivator_foo *r)
1732 {
1733         if (flags & NDR_IN) {
1734         }
1735         if (flags & NDR_OUT) {
1736                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1737         }
1738         return NDR_ERR_SUCCESS;
1739 }
1740
1741 _PUBLIC_ void ndr_print_IMachineLocalActivator_foo(struct ndr_print *ndr, const char *name, int flags, const struct IMachineLocalActivator_foo *r)
1742 {
1743         ndr_print_struct(ndr, name, "IMachineLocalActivator_foo");
1744         ndr->depth++;
1745         if (flags & NDR_SET_VALUES) {
1746                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1747         }
1748         if (flags & NDR_IN) {
1749                 ndr_print_struct(ndr, "in", "IMachineLocalActivator_foo");
1750                 ndr->depth++;
1751                 ndr->depth--;
1752         }
1753         if (flags & NDR_OUT) {
1754                 ndr_print_struct(ndr, "out", "IMachineLocalActivator_foo");
1755                 ndr->depth++;
1756                 ndr_print_WERROR(ndr, "result", r->out.result);
1757                 ndr->depth--;
1758         }
1759         ndr->depth--;
1760 }
1761
1762 static const struct ndr_interface_call IMachineLocalActivator_calls[] = {
1763         {
1764                 "IMachineLocalActivator_foo",
1765                 sizeof(struct IMachineLocalActivator_foo),
1766                 (ndr_push_flags_fn_t) ndr_push_IMachineLocalActivator_foo,
1767                 (ndr_pull_flags_fn_t) ndr_pull_IMachineLocalActivator_foo,
1768                 (ndr_print_function_t) ndr_print_IMachineLocalActivator_foo,
1769                 false,
1770         },
1771         { NULL, 0, NULL, NULL, NULL, false }
1772 };
1773
1774 static const char * const IMachineLocalActivator_endpoint_strings[] = {
1775         "ncacn_np:[\\pipe\\IMachineLocalActivator]", 
1776 };
1777
1778 static const struct ndr_interface_string_array IMachineLocalActivator_endpoints = {
1779         .count  = 1,
1780         .names  = IMachineLocalActivator_endpoint_strings
1781 };
1782
1783 static const char * const IMachineLocalActivator_authservice_strings[] = {
1784         "host", 
1785 };
1786
1787 static const struct ndr_interface_string_array IMachineLocalActivator_authservices = {
1788         .count  = 1,
1789         .names  = IMachineLocalActivator_authservice_strings
1790 };
1791
1792
1793 const struct ndr_interface_table ndr_table_IMachineLocalActivator = {
1794         .name           = "IMachineLocalActivator",
1795         .syntax_id      = {
1796                 {0xc6f3ee72,0xce7e,0x11d1,{0xb7,0x1e},{0x00,0xc0,0x4f,0xc3,0x11,0x1a}},
1797                 NDR_IMACHINELOCALACTIVATOR_VERSION
1798         },
1799         .helpstring     = NDR_IMACHINELOCALACTIVATOR_HELPSTRING,
1800         .num_calls      = 1,
1801         .calls          = IMachineLocalActivator_calls,
1802         .endpoints      = &IMachineLocalActivator_endpoints,
1803         .authservices   = &IMachineLocalActivator_authservices
1804 };
1805
1806 static enum ndr_err_code ndr_push_ILocalObjectExporter_Foo(struct ndr_push *ndr, int flags, const struct ILocalObjectExporter_Foo *r)
1807 {
1808         if (flags & NDR_IN) {
1809         }
1810         if (flags & NDR_OUT) {
1811                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1812         }
1813         return NDR_ERR_SUCCESS;
1814 }
1815
1816 static enum ndr_err_code ndr_pull_ILocalObjectExporter_Foo(struct ndr_pull *ndr, int flags, struct ILocalObjectExporter_Foo *r)
1817 {
1818         if (flags & NDR_IN) {
1819         }
1820         if (flags & NDR_OUT) {
1821                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1822         }
1823         return NDR_ERR_SUCCESS;
1824 }
1825
1826 _PUBLIC_ void ndr_print_ILocalObjectExporter_Foo(struct ndr_print *ndr, const char *name, int flags, const struct ILocalObjectExporter_Foo *r)
1827 {
1828         ndr_print_struct(ndr, name, "ILocalObjectExporter_Foo");
1829         ndr->depth++;
1830         if (flags & NDR_SET_VALUES) {
1831                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1832         }
1833         if (flags & NDR_IN) {
1834                 ndr_print_struct(ndr, "in", "ILocalObjectExporter_Foo");
1835                 ndr->depth++;
1836                 ndr->depth--;
1837         }
1838         if (flags & NDR_OUT) {
1839                 ndr_print_struct(ndr, "out", "ILocalObjectExporter_Foo");
1840                 ndr->depth++;
1841                 ndr_print_WERROR(ndr, "result", r->out.result);
1842                 ndr->depth--;
1843         }
1844         ndr->depth--;
1845 }
1846
1847 static const struct ndr_interface_call ILocalObjectExporter_calls[] = {
1848         {
1849                 "ILocalObjectExporter_Foo",
1850                 sizeof(struct ILocalObjectExporter_Foo),
1851                 (ndr_push_flags_fn_t) ndr_push_ILocalObjectExporter_Foo,
1852                 (ndr_pull_flags_fn_t) ndr_pull_ILocalObjectExporter_Foo,
1853                 (ndr_print_function_t) ndr_print_ILocalObjectExporter_Foo,
1854                 false,
1855         },
1856         { NULL, 0, NULL, NULL, NULL, false }
1857 };
1858
1859 static const char * const ILocalObjectExporter_endpoint_strings[] = {
1860         "ncacn_np:[\\pipe\\ILocalObjectExporter]", 
1861 };
1862
1863 static const struct ndr_interface_string_array ILocalObjectExporter_endpoints = {
1864         .count  = 1,
1865         .names  = ILocalObjectExporter_endpoint_strings
1866 };
1867
1868 static const char * const ILocalObjectExporter_authservice_strings[] = {
1869         "host", 
1870 };
1871
1872 static const struct ndr_interface_string_array ILocalObjectExporter_authservices = {
1873         .count  = 1,
1874         .names  = ILocalObjectExporter_authservice_strings
1875 };
1876
1877
1878 const struct ndr_interface_table ndr_table_ILocalObjectExporter = {
1879         .name           = "ILocalObjectExporter",
1880         .syntax_id      = {
1881                 {0xe60c73e6,0x88f9,0x11cf,{0x9a,0xf1},{0x00,0x20,0xaf,0x6e,0x72,0xf4}},
1882                 NDR_ILOCALOBJECTEXPORTER_VERSION
1883         },
1884         .helpstring     = NDR_ILOCALOBJECTEXPORTER_HELPSTRING,
1885         .num_calls      = 1,
1886         .calls          = ILocalObjectExporter_calls,
1887         .endpoints      = &ILocalObjectExporter_endpoints,
1888         .authservices   = &ILocalObjectExporter_authservices
1889 };
1890
1891 #include "librpc/gen_ndr/ndr_orpc.h"
1892 static enum ndr_err_code ndr_push_ISystemActivatorRemoteCreateInstance(struct ndr_push *ndr, int flags, const struct ISystemActivatorRemoteCreateInstance *r)
1893 {
1894         if (flags & NDR_IN) {
1895                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
1896                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.unknown1));
1897                 NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.iface1));
1898                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.unknown2));
1899         }
1900         if (flags & NDR_OUT) {
1901                 if (r->out.ORPCthat == NULL) {
1902                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1903                 }
1904                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
1905                 if (r->out.unknown3 == NULL) {
1906                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1907                 }
1908                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown3));
1909                 if (r->out.iface2 == NULL) {
1910                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1911                 }
1912                 NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.iface2));
1913                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1914         }
1915         return NDR_ERR_SUCCESS;
1916 }
1917
1918 static enum ndr_err_code ndr_pull_ISystemActivatorRemoteCreateInstance(struct ndr_pull *ndr, int flags, struct ISystemActivatorRemoteCreateInstance *r)
1919 {
1920         TALLOC_CTX *_mem_save_ORPCthat_0;
1921         TALLOC_CTX *_mem_save_unknown3_0;
1922         TALLOC_CTX *_mem_save_iface2_0;
1923         if (flags & NDR_IN) {
1924                 ZERO_STRUCT(r->out);
1925
1926                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
1927                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.unknown1));
1928                 NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.iface1));
1929                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.unknown2));
1930                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1931                 ZERO_STRUCTP(r->out.ORPCthat);
1932                 NDR_PULL_ALLOC(ndr, r->out.unknown3);
1933                 ZERO_STRUCTP(r->out.unknown3);
1934                 NDR_PULL_ALLOC(ndr, r->out.iface2);
1935                 ZERO_STRUCTP(r->out.iface2);
1936         }
1937         if (flags & NDR_OUT) {
1938                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1939                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
1940                 }
1941                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
1942                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
1943                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
1944                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
1945                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1946                         NDR_PULL_ALLOC(ndr, r->out.unknown3);
1947                 }
1948                 _mem_save_unknown3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1949                 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown3, LIBNDR_FLAG_REF_ALLOC);
1950                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown3));
1951                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown3_0, LIBNDR_FLAG_REF_ALLOC);
1952                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1953                         NDR_PULL_ALLOC(ndr, r->out.iface2);
1954                 }
1955                 _mem_save_iface2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1956                 NDR_PULL_SET_MEM_CTX(ndr, r->out.iface2, LIBNDR_FLAG_REF_ALLOC);
1957                 NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.iface2));
1958                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_iface2_0, LIBNDR_FLAG_REF_ALLOC);
1959                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1960         }
1961         return NDR_ERR_SUCCESS;
1962 }
1963
1964 _PUBLIC_ void ndr_print_ISystemActivatorRemoteCreateInstance(struct ndr_print *ndr, const char *name, int flags, const struct ISystemActivatorRemoteCreateInstance *r)
1965 {
1966         ndr_print_struct(ndr, name, "ISystemActivatorRemoteCreateInstance");
1967         ndr->depth++;
1968         if (flags & NDR_SET_VALUES) {
1969                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1970         }
1971         if (flags & NDR_IN) {
1972                 ndr_print_struct(ndr, "in", "ISystemActivatorRemoteCreateInstance");
1973                 ndr->depth++;
1974                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
1975                 ndr_print_hyper(ndr, "unknown1", r->in.unknown1);
1976                 ndr_print_MInterfacePointer(ndr, "iface1", &r->in.iface1);
1977                 ndr_print_hyper(ndr, "unknown2", r->in.unknown2);
1978                 ndr->depth--;
1979         }
1980         if (flags & NDR_OUT) {
1981                 ndr_print_struct(ndr, "out", "ISystemActivatorRemoteCreateInstance");
1982                 ndr->depth++;
1983                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
1984                 ndr->depth++;
1985                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
1986                 ndr->depth--;
1987                 ndr_print_ptr(ndr, "unknown3", r->out.unknown3);
1988                 ndr->depth++;
1989                 ndr_print_uint32(ndr, "unknown3", *r->out.unknown3);
1990                 ndr->depth--;
1991                 ndr_print_ptr(ndr, "iface2", r->out.iface2);
1992                 ndr->depth++;
1993                 ndr_print_MInterfacePointer(ndr, "iface2", r->out.iface2);
1994                 ndr->depth--;
1995                 ndr_print_WERROR(ndr, "result", r->out.result);
1996                 ndr->depth--;
1997         }
1998         ndr->depth--;
1999 }
2000
2001 static const struct ndr_interface_call ISystemActivator_calls[] = {
2002         {
2003                 "ISystemActivatorRemoteCreateInstance",
2004                 sizeof(struct ISystemActivatorRemoteCreateInstance),
2005                 (ndr_push_flags_fn_t) ndr_push_ISystemActivatorRemoteCreateInstance,
2006                 (ndr_pull_flags_fn_t) ndr_pull_ISystemActivatorRemoteCreateInstance,
2007                 (ndr_print_function_t) ndr_print_ISystemActivatorRemoteCreateInstance,
2008                 false,
2009         },
2010         { NULL, 0, NULL, NULL, NULL, false }
2011 };
2012
2013 static const char * const ISystemActivator_endpoint_strings[] = {
2014         "ncacn_np:[\\pipe\\ISystemActivator]", 
2015 };
2016
2017 static const struct ndr_interface_string_array ISystemActivator_endpoints = {
2018         .count  = 1,
2019         .names  = ISystemActivator_endpoint_strings
2020 };
2021
2022 static const char * const ISystemActivator_authservice_strings[] = {
2023         "host", 
2024 };
2025
2026 static const struct ndr_interface_string_array ISystemActivator_authservices = {
2027         .count  = 1,
2028         .names  = ISystemActivator_authservice_strings
2029 };
2030
2031
2032 const struct ndr_interface_table ndr_table_ISystemActivator = {
2033         .name           = "ISystemActivator",
2034         .syntax_id      = {
2035                 {0x000001a0,0x0000,0x0000,{0xc0,0x00},{0x00,0x00,0x00,0x00,0x00,0x46}},
2036                 NDR_ISYSTEMACTIVATOR_VERSION
2037         },
2038         .helpstring     = NDR_ISYSTEMACTIVATOR_HELPSTRING,
2039         .num_calls      = 1,
2040         .calls          = ISystemActivator_calls,
2041         .endpoints      = &ISystemActivator_endpoints,
2042         .authservices   = &ISystemActivator_authservices
2043 };
2044
2045 #include "librpc/gen_ndr/ndr_orpc.h"
2046 static enum ndr_err_code ndr_push_RemQueryInterface2(struct ndr_push *ndr, int flags, const struct RemQueryInterface2 *r)
2047 {
2048         uint32_t cntr_iids_1;
2049         uint32_t cntr_phr_1;
2050         uint32_t cntr_ppMIF_1;
2051         if (flags & NDR_IN) {
2052                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
2053                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ripid));
2054                 if (r->in.ripid) {
2055                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.ripid));
2056                 }
2057                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.cIids));
2058                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.iids));
2059                 if (r->in.iids) {
2060                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cIids));
2061                         for (cntr_iids_1 = 0; cntr_iids_1 < r->in.cIids; cntr_iids_1++) {
2062                                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->in.iids[cntr_iids_1]));
2063                         }
2064                 }
2065         }
2066         if (flags & NDR_OUT) {
2067                 if (r->out.ORPCthat == NULL) {
2068                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2069                 }
2070                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
2071                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.phr));
2072                 if (r->out.phr) {
2073                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cIids));
2074                         for (cntr_phr_1 = 0; cntr_phr_1 < r->in.cIids; cntr_phr_1++) {
2075                                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.phr[cntr_phr_1]));
2076                         }
2077                 }
2078                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.ppMIF));
2079                 if (r->out.ppMIF) {
2080                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cIids));
2081                         for (cntr_ppMIF_1 = 0; cntr_ppMIF_1 < r->in.cIids; cntr_ppMIF_1++) {
2082                                 NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_SCALARS, &r->out.ppMIF[cntr_ppMIF_1]));
2083                         }
2084                         for (cntr_ppMIF_1 = 0; cntr_ppMIF_1 < r->in.cIids; cntr_ppMIF_1++) {
2085                                 NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_BUFFERS, &r->out.ppMIF[cntr_ppMIF_1]));
2086                         }
2087                 }
2088                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2089         }
2090         return NDR_ERR_SUCCESS;
2091 }
2092
2093 static enum ndr_err_code ndr_pull_RemQueryInterface2(struct ndr_pull *ndr, int flags, struct RemQueryInterface2 *r)
2094 {
2095         uint32_t _ptr_ripid;
2096         uint32_t _ptr_iids;
2097         uint32_t cntr_iids_1;
2098         uint32_t _ptr_phr;
2099         uint32_t cntr_phr_1;
2100         uint32_t _ptr_ppMIF;
2101         uint32_t cntr_ppMIF_1;
2102         TALLOC_CTX *_mem_save_ORPCthat_0;
2103         TALLOC_CTX *_mem_save_ripid_0;
2104         TALLOC_CTX *_mem_save_iids_0;
2105         TALLOC_CTX *_mem_save_iids_1;
2106         TALLOC_CTX *_mem_save_phr_0;
2107         TALLOC_CTX *_mem_save_phr_1;
2108         TALLOC_CTX *_mem_save_ppMIF_0;
2109         TALLOC_CTX *_mem_save_ppMIF_1;
2110         if (flags & NDR_IN) {
2111                 ZERO_STRUCT(r->out);
2112
2113                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
2114                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ripid));
2115                 if (_ptr_ripid) {
2116                         NDR_PULL_ALLOC(ndr, r->in.ripid);
2117                 } else {
2118                         r->in.ripid = NULL;
2119                 }
2120                 if (r->in.ripid) {
2121                         _mem_save_ripid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2122                         NDR_PULL_SET_MEM_CTX(ndr, r->in.ripid, 0);
2123                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.ripid));
2124                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ripid_0, 0);
2125                 }
2126                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.cIids));
2127                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_iids));
2128                 if (_ptr_iids) {
2129                         NDR_PULL_ALLOC(ndr, r->in.iids);
2130                 } else {
2131                         r->in.iids = NULL;
2132                 }
2133                 if (r->in.iids) {
2134                         _mem_save_iids_0 = NDR_PULL_GET_MEM_CTX(ndr);
2135                         NDR_PULL_SET_MEM_CTX(ndr, r->in.iids, 0);
2136                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.iids));
2137                         NDR_PULL_ALLOC_N(ndr, r->in.iids, ndr_get_array_size(ndr, &r->in.iids));
2138                         _mem_save_iids_1 = NDR_PULL_GET_MEM_CTX(ndr);
2139                         NDR_PULL_SET_MEM_CTX(ndr, r->in.iids, 0);
2140                         for (cntr_iids_1 = 0; cntr_iids_1 < r->in.cIids; cntr_iids_1++) {
2141                                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->in.iids[cntr_iids_1]));
2142                         }
2143                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_iids_1, 0);
2144                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_iids_0, 0);
2145                 }
2146                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
2147                 ZERO_STRUCTP(r->out.ORPCthat);
2148                 if (r->in.iids) {
2149                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.iids, r->in.cIids));
2150                 }
2151         }
2152         if (flags & NDR_OUT) {
2153                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2154                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
2155                 }
2156                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
2157                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
2158                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
2159                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
2160                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_phr));
2161                 if (_ptr_phr) {
2162                         NDR_PULL_ALLOC(ndr, r->out.phr);
2163                 } else {
2164                         r->out.phr = NULL;
2165                 }
2166                 if (r->out.phr) {
2167                         _mem_save_phr_0 = NDR_PULL_GET_MEM_CTX(ndr);
2168                         NDR_PULL_SET_MEM_CTX(ndr, r->out.phr, 0);
2169                         NDR_CHECK(ndr_pull_array_size(ndr, &r->out.phr));
2170                         NDR_PULL_ALLOC_N(ndr, r->out.phr, ndr_get_array_size(ndr, &r->out.phr));
2171                         _mem_save_phr_1 = NDR_PULL_GET_MEM_CTX(ndr);
2172                         NDR_PULL_SET_MEM_CTX(ndr, r->out.phr, 0);
2173                         for (cntr_phr_1 = 0; cntr_phr_1 < r->in.cIids; cntr_phr_1++) {
2174                                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.phr[cntr_phr_1]));
2175                         }
2176                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phr_1, 0);
2177                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phr_0, 0);
2178                 }
2179                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ppMIF));
2180                 if (_ptr_ppMIF) {
2181                         NDR_PULL_ALLOC(ndr, r->out.ppMIF);
2182                 } else {
2183                         r->out.ppMIF = NULL;
2184                 }
2185                 if (r->out.ppMIF) {
2186                         _mem_save_ppMIF_0 = NDR_PULL_GET_MEM_CTX(ndr);
2187                         NDR_PULL_SET_MEM_CTX(ndr, r->out.ppMIF, 0);
2188                         NDR_CHECK(ndr_pull_array_size(ndr, &r->out.ppMIF));
2189                         NDR_PULL_ALLOC_N(ndr, r->out.ppMIF, ndr_get_array_size(ndr, &r->out.ppMIF));
2190                         _mem_save_ppMIF_1 = NDR_PULL_GET_MEM_CTX(ndr);
2191                         NDR_PULL_SET_MEM_CTX(ndr, r->out.ppMIF, 0);
2192                         for (cntr_ppMIF_1 = 0; cntr_ppMIF_1 < r->in.cIids; cntr_ppMIF_1++) {
2193                                 NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS, &r->out.ppMIF[cntr_ppMIF_1]));
2194                         }
2195                         for (cntr_ppMIF_1 = 0; cntr_ppMIF_1 < r->in.cIids; cntr_ppMIF_1++) {
2196                                 NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_BUFFERS, &r->out.ppMIF[cntr_ppMIF_1]));
2197                         }
2198                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppMIF_1, 0);
2199                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppMIF_0, 0);
2200                 }
2201                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2202                 if (r->out.phr) {
2203                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.phr, r->in.cIids));
2204                 }
2205                 if (r->out.ppMIF) {
2206                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.ppMIF, r->in.cIids));
2207                 }
2208         }
2209         return NDR_ERR_SUCCESS;
2210 }
2211
2212 _PUBLIC_ void ndr_print_RemQueryInterface2(struct ndr_print *ndr, const char *name, int flags, const struct RemQueryInterface2 *r)
2213 {
2214         uint32_t cntr_iids_1;
2215         uint32_t cntr_phr_1;
2216         uint32_t cntr_ppMIF_1;
2217         ndr_print_struct(ndr, name, "RemQueryInterface2");
2218         ndr->depth++;
2219         if (flags & NDR_SET_VALUES) {
2220                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2221         }
2222         if (flags & NDR_IN) {
2223                 ndr_print_struct(ndr, "in", "RemQueryInterface2");
2224                 ndr->depth++;
2225                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
2226                 ndr_print_ptr(ndr, "ripid", r->in.ripid);
2227                 ndr->depth++;
2228                 if (r->in.ripid) {
2229                         ndr_print_GUID(ndr, "ripid", r->in.ripid);
2230                 }
2231                 ndr->depth--;
2232                 ndr_print_uint16(ndr, "cIids", r->in.cIids);
2233                 ndr_print_ptr(ndr, "iids", r->in.iids);
2234                 ndr->depth++;
2235                 if (r->in.iids) {
2236                         ndr->print(ndr, "%s: ARRAY(%d)", "iids", (int)r->in.cIids);
2237                         ndr->depth++;
2238                         for (cntr_iids_1=0;cntr_iids_1<r->in.cIids;cntr_iids_1++) {
2239                                 char *idx_1=NULL;
2240                                 if (asprintf(&idx_1, "[%d]", cntr_iids_1) != -1) {
2241                                         ndr_print_GUID(ndr, "iids", &r->in.iids[cntr_iids_1]);
2242                                         free(idx_1);
2243                                 }
2244                         }
2245                         ndr->depth--;
2246                 }
2247                 ndr->depth--;
2248                 ndr->depth--;
2249         }
2250         if (flags & NDR_OUT) {
2251                 ndr_print_struct(ndr, "out", "RemQueryInterface2");
2252                 ndr->depth++;
2253                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
2254                 ndr->depth++;
2255                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
2256                 ndr->depth--;
2257                 ndr_print_ptr(ndr, "phr", r->out.phr);
2258                 ndr->depth++;
2259                 if (r->out.phr) {
2260                         ndr->print(ndr, "%s: ARRAY(%d)", "phr", (int)r->in.cIids);
2261                         ndr->depth++;
2262                         for (cntr_phr_1=0;cntr_phr_1<r->in.cIids;cntr_phr_1++) {
2263                                 char *idx_1=NULL;
2264                                 if (asprintf(&idx_1, "[%d]", cntr_phr_1) != -1) {
2265                                         ndr_print_WERROR(ndr, "phr", r->out.phr[cntr_phr_1]);
2266                                         free(idx_1);
2267                                 }
2268                         }
2269                         ndr->depth--;
2270                 }
2271                 ndr->depth--;
2272                 ndr_print_ptr(ndr, "ppMIF", r->out.ppMIF);
2273                 ndr->depth++;
2274                 if (r->out.ppMIF) {
2275                         ndr->print(ndr, "%s: ARRAY(%d)", "ppMIF", (int)r->in.cIids);
2276                         ndr->depth++;
2277                         for (cntr_ppMIF_1=0;cntr_ppMIF_1<r->in.cIids;cntr_ppMIF_1++) {
2278                                 char *idx_1=NULL;
2279                                 if (asprintf(&idx_1, "[%d]", cntr_ppMIF_1) != -1) {
2280                                         ndr_print_MInterfacePointer(ndr, "ppMIF", &r->out.ppMIF[cntr_ppMIF_1]);
2281                                         free(idx_1);
2282                                 }
2283                         }
2284                         ndr->depth--;
2285                 }
2286                 ndr->depth--;
2287                 ndr_print_WERROR(ndr, "result", r->out.result);
2288                 ndr->depth--;
2289         }
2290         ndr->depth--;
2291 }
2292
2293 static const struct ndr_interface_call IRemUnknown2_calls[] = {
2294         {
2295                 "RemQueryInterface2",
2296                 sizeof(struct RemQueryInterface2),
2297                 (ndr_push_flags_fn_t) ndr_push_RemQueryInterface2,
2298                 (ndr_pull_flags_fn_t) ndr_pull_RemQueryInterface2,
2299                 (ndr_print_function_t) ndr_print_RemQueryInterface2,
2300                 false,
2301         },
2302         { NULL, 0, NULL, NULL, NULL, false }
2303 };
2304
2305 static const char * const IRemUnknown2_endpoint_strings[] = {
2306         "ncacn_np:[\\pipe\\IRemUnknown2]", 
2307 };
2308
2309 static const struct ndr_interface_string_array IRemUnknown2_endpoints = {
2310         .count  = 1,
2311         .names  = IRemUnknown2_endpoint_strings
2312 };
2313
2314 static const char * const IRemUnknown2_authservice_strings[] = {
2315         "host", 
2316 };
2317
2318 static const struct ndr_interface_string_array IRemUnknown2_authservices = {
2319         .count  = 1,
2320         .names  = IRemUnknown2_authservice_strings
2321 };
2322
2323
2324 const struct ndr_interface_table ndr_table_IRemUnknown2 = {
2325         .name           = "IRemUnknown2",
2326         .syntax_id      = {
2327                 {0x00000143,0x0000,0x0000,{0xc0,0x00},{0x00,0x00,0x00,0x00,0x00,0x46}},
2328                 NDR_IREMUNKNOWN2_VERSION
2329         },
2330         .helpstring     = NDR_IREMUNKNOWN2_HELPSTRING,
2331         .num_calls      = 1,
2332         .calls          = IRemUnknown2_calls,
2333         .endpoints      = &IRemUnknown2_endpoints,
2334         .authservices   = &IRemUnknown2_authservices
2335 };
2336
2337 #include "librpc/gen_ndr/ndr_orpc.h"
2338 static enum ndr_err_code ndr_push_REF_ITypeInfo(struct ndr_push *ndr, int ndr_flags, const struct REF_ITypeInfo *r)
2339 {
2340         if (ndr_flags & NDR_SCALARS) {
2341                 NDR_CHECK(ndr_push_align(ndr, 1));
2342                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
2343         }
2344         if (ndr_flags & NDR_BUFFERS) {
2345         }
2346         return NDR_ERR_SUCCESS;
2347 }
2348
2349 static enum ndr_err_code ndr_pull_REF_ITypeInfo(struct ndr_pull *ndr, int ndr_flags, struct REF_ITypeInfo *r)
2350 {
2351         if (ndr_flags & NDR_SCALARS) {
2352                 NDR_CHECK(ndr_pull_align(ndr, 1));
2353                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
2354         }
2355         if (ndr_flags & NDR_BUFFERS) {
2356         }
2357         return NDR_ERR_SUCCESS;
2358 }
2359
2360 _PUBLIC_ void ndr_print_REF_ITypeInfo(struct ndr_print *ndr, const char *name, const struct REF_ITypeInfo *r)
2361 {
2362         ndr_print_struct(ndr, name, "REF_ITypeInfo");
2363         ndr->depth++;
2364         ndr->depth--;
2365 }
2366
2367 static enum ndr_err_code ndr_push_VARIANT(struct ndr_push *ndr, int ndr_flags, const struct VARIANT *r)
2368 {
2369         if (ndr_flags & NDR_SCALARS) {
2370                 NDR_CHECK(ndr_push_align(ndr, 2));
2371                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->vartype));
2372                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->FIXME));
2373                 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
2374         }
2375         if (ndr_flags & NDR_BUFFERS) {
2376         }
2377         return NDR_ERR_SUCCESS;
2378 }
2379
2380 static enum ndr_err_code ndr_pull_VARIANT(struct ndr_pull *ndr, int ndr_flags, struct VARIANT *r)
2381 {
2382         if (ndr_flags & NDR_SCALARS) {
2383                 NDR_CHECK(ndr_pull_align(ndr, 2));
2384                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->vartype));
2385                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->FIXME));
2386                 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
2387         }
2388         if (ndr_flags & NDR_BUFFERS) {
2389         }
2390         return NDR_ERR_SUCCESS;
2391 }
2392
2393 _PUBLIC_ void ndr_print_VARIANT(struct ndr_print *ndr, const char *name, const struct VARIANT *r)
2394 {
2395         ndr_print_struct(ndr, name, "VARIANT");
2396         ndr->depth++;
2397         ndr_print_uint16(ndr, "vartype", r->vartype);
2398         ndr_print_uint16(ndr, "FIXME", r->FIXME);
2399         ndr->depth--;
2400 }
2401
2402 static enum ndr_err_code ndr_push_DISPPARAMS(struct ndr_push *ndr, int ndr_flags, const struct DISPPARAMS *r)
2403 {
2404         if (ndr_flags & NDR_SCALARS) {
2405                 NDR_CHECK(ndr_push_align(ndr, 2));
2406                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->FIXME));
2407                 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
2408         }
2409         if (ndr_flags & NDR_BUFFERS) {
2410         }
2411         return NDR_ERR_SUCCESS;
2412 }
2413
2414 static enum ndr_err_code ndr_pull_DISPPARAMS(struct ndr_pull *ndr, int ndr_flags, struct DISPPARAMS *r)
2415 {
2416         if (ndr_flags & NDR_SCALARS) {
2417                 NDR_CHECK(ndr_pull_align(ndr, 2));
2418                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->FIXME));
2419                 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
2420         }
2421         if (ndr_flags & NDR_BUFFERS) {
2422         }
2423         return NDR_ERR_SUCCESS;
2424 }
2425
2426 _PUBLIC_ void ndr_print_DISPPARAMS(struct ndr_print *ndr, const char *name, const struct DISPPARAMS *r)
2427 {
2428         ndr_print_struct(ndr, name, "DISPPARAMS");
2429         ndr->depth++;
2430         ndr_print_uint16(ndr, "FIXME", r->FIXME);
2431         ndr->depth--;
2432 }
2433
2434 static enum ndr_err_code ndr_push_EXCEPINFO(struct ndr_push *ndr, int ndr_flags, const struct EXCEPINFO *r)
2435 {
2436         if (ndr_flags & NDR_SCALARS) {
2437                 NDR_CHECK(ndr_push_align(ndr, 2));
2438                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->FIXME));
2439                 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
2440         }
2441         if (ndr_flags & NDR_BUFFERS) {
2442         }
2443         return NDR_ERR_SUCCESS;
2444 }
2445
2446 static enum ndr_err_code ndr_pull_EXCEPINFO(struct ndr_pull *ndr, int ndr_flags, struct EXCEPINFO *r)
2447 {
2448         if (ndr_flags & NDR_SCALARS) {
2449                 NDR_CHECK(ndr_pull_align(ndr, 2));
2450                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->FIXME));
2451                 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
2452         }
2453         if (ndr_flags & NDR_BUFFERS) {
2454         }
2455         return NDR_ERR_SUCCESS;
2456 }
2457
2458 _PUBLIC_ void ndr_print_EXCEPINFO(struct ndr_print *ndr, const char *name, const struct EXCEPINFO *r)
2459 {
2460         ndr_print_struct(ndr, name, "EXCEPINFO");
2461         ndr->depth++;
2462         ndr_print_uint16(ndr, "FIXME", r->FIXME);
2463         ndr->depth--;
2464 }
2465
2466 static enum ndr_err_code ndr_push_GetTypeInfoCount(struct ndr_push *ndr, int flags, const struct GetTypeInfoCount *r)
2467 {
2468         if (flags & NDR_IN) {
2469                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
2470         }
2471         if (flags & NDR_OUT) {
2472                 if (r->out.ORPCthat == NULL) {
2473                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2474                 }
2475                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
2476                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pctinfo));
2477                 if (r->out.pctinfo) {
2478                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.pctinfo));
2479                 }
2480                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2481         }
2482         return NDR_ERR_SUCCESS;
2483 }
2484
2485 static enum ndr_err_code ndr_pull_GetTypeInfoCount(struct ndr_pull *ndr, int flags, struct GetTypeInfoCount *r)
2486 {
2487         uint32_t _ptr_pctinfo;
2488         TALLOC_CTX *_mem_save_ORPCthat_0;
2489         TALLOC_CTX *_mem_save_pctinfo_0;
2490         if (flags & NDR_IN) {
2491                 ZERO_STRUCT(r->out);
2492
2493                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
2494                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
2495                 ZERO_STRUCTP(r->out.ORPCthat);
2496         }
2497         if (flags & NDR_OUT) {
2498                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2499                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
2500                 }
2501                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
2502                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
2503                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
2504                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
2505                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pctinfo));
2506                 if (_ptr_pctinfo) {
2507                         NDR_PULL_ALLOC(ndr, r->out.pctinfo);
2508                 } else {
2509                         r->out.pctinfo = NULL;
2510                 }
2511                 if (r->out.pctinfo) {
2512                         _mem_save_pctinfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
2513                         NDR_PULL_SET_MEM_CTX(ndr, r->out.pctinfo, 0);
2514                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.pctinfo));
2515                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pctinfo_0, 0);
2516                 }
2517                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2518         }
2519         return NDR_ERR_SUCCESS;
2520 }
2521
2522 _PUBLIC_ void ndr_print_GetTypeInfoCount(struct ndr_print *ndr, const char *name, int flags, const struct GetTypeInfoCount *r)
2523 {
2524         ndr_print_struct(ndr, name, "GetTypeInfoCount");
2525         ndr->depth++;
2526         if (flags & NDR_SET_VALUES) {
2527                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2528         }
2529         if (flags & NDR_IN) {
2530                 ndr_print_struct(ndr, "in", "GetTypeInfoCount");
2531                 ndr->depth++;
2532                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
2533                 ndr->depth--;
2534         }
2535         if (flags & NDR_OUT) {
2536                 ndr_print_struct(ndr, "out", "GetTypeInfoCount");
2537                 ndr->depth++;
2538                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
2539                 ndr->depth++;
2540                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
2541                 ndr->depth--;
2542                 ndr_print_ptr(ndr, "pctinfo", r->out.pctinfo);
2543                 ndr->depth++;
2544                 if (r->out.pctinfo) {
2545                         ndr_print_uint16(ndr, "pctinfo", *r->out.pctinfo);
2546                 }
2547                 ndr->depth--;
2548                 ndr_print_WERROR(ndr, "result", r->out.result);
2549                 ndr->depth--;
2550         }
2551         ndr->depth--;
2552 }
2553
2554 static enum ndr_err_code ndr_push_GetTypeInfo(struct ndr_push *ndr, int flags, const struct GetTypeInfo *r)
2555 {
2556         if (flags & NDR_IN) {
2557                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
2558                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.iTInfo));
2559                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lcid));
2560         }
2561         if (flags & NDR_OUT) {
2562                 if (r->out.ORPCthat == NULL) {
2563                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2564                 }
2565                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
2566                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.ppTInfo));
2567                 if (r->out.ppTInfo) {
2568                         NDR_CHECK(ndr_push_REF_ITypeInfo(ndr, NDR_SCALARS, r->out.ppTInfo));
2569                 }
2570                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2571         }
2572         return NDR_ERR_SUCCESS;
2573 }
2574
2575 static enum ndr_err_code ndr_pull_GetTypeInfo(struct ndr_pull *ndr, int flags, struct GetTypeInfo *r)
2576 {
2577         uint32_t _ptr_ppTInfo;
2578         TALLOC_CTX *_mem_save_ORPCthat_0;
2579         TALLOC_CTX *_mem_save_ppTInfo_0;
2580         if (flags & NDR_IN) {
2581                 ZERO_STRUCT(r->out);
2582
2583                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
2584                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.iTInfo));
2585                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lcid));
2586                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
2587                 ZERO_STRUCTP(r->out.ORPCthat);
2588         }
2589         if (flags & NDR_OUT) {
2590                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2591                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
2592                 }
2593                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
2594                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
2595                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
2596                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
2597                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ppTInfo));
2598                 if (_ptr_ppTInfo) {
2599                         NDR_PULL_ALLOC(ndr, r->out.ppTInfo);
2600                 } else {
2601                         r->out.ppTInfo = NULL;
2602                 }
2603                 if (r->out.ppTInfo) {
2604                         _mem_save_ppTInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
2605                         NDR_PULL_SET_MEM_CTX(ndr, r->out.ppTInfo, 0);
2606                         NDR_CHECK(ndr_pull_REF_ITypeInfo(ndr, NDR_SCALARS, r->out.ppTInfo));
2607                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppTInfo_0, 0);
2608                 }
2609                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2610         }
2611         return NDR_ERR_SUCCESS;
2612 }
2613
2614 _PUBLIC_ void ndr_print_GetTypeInfo(struct ndr_print *ndr, const char *name, int flags, const struct GetTypeInfo *r)
2615 {
2616         ndr_print_struct(ndr, name, "GetTypeInfo");
2617         ndr->depth++;
2618         if (flags & NDR_SET_VALUES) {
2619                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2620         }
2621         if (flags & NDR_IN) {
2622                 ndr_print_struct(ndr, "in", "GetTypeInfo");
2623                 ndr->depth++;
2624                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
2625                 ndr_print_uint16(ndr, "iTInfo", r->in.iTInfo);
2626                 ndr_print_uint32(ndr, "lcid", r->in.lcid);
2627                 ndr->depth--;
2628         }
2629         if (flags & NDR_OUT) {
2630                 ndr_print_struct(ndr, "out", "GetTypeInfo");
2631                 ndr->depth++;
2632                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
2633                 ndr->depth++;
2634                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
2635                 ndr->depth--;
2636                 ndr_print_ptr(ndr, "ppTInfo", r->out.ppTInfo);
2637                 ndr->depth++;
2638                 if (r->out.ppTInfo) {
2639                         ndr_print_REF_ITypeInfo(ndr, "ppTInfo", r->out.ppTInfo);
2640                 }
2641                 ndr->depth--;
2642                 ndr_print_WERROR(ndr, "result", r->out.result);
2643                 ndr->depth--;
2644         }
2645         ndr->depth--;
2646 }
2647
2648 static enum ndr_err_code ndr_push_GetIDsOfNames(struct ndr_push *ndr, int flags, const struct GetIDsOfNames *r)
2649 {
2650         uint32_t cntr_rgDispId_1;
2651         if (flags & NDR_IN) {
2652                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
2653                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.riid));
2654                 if (r->in.riid) {
2655                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.riid));
2656                 }
2657                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.cNames));
2658                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lcid));
2659         }
2660         if (flags & NDR_OUT) {
2661                 if (r->out.ORPCthat == NULL) {
2662                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2663                 }
2664                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
2665                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.rgDispId));
2666                 if (r->out.rgDispId) {
2667                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cNames));
2668                         for (cntr_rgDispId_1 = 0; cntr_rgDispId_1 < r->in.cNames; cntr_rgDispId_1++) {
2669                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.rgDispId[cntr_rgDispId_1]));
2670                         }
2671                 }
2672                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2673         }
2674         return NDR_ERR_SUCCESS;
2675 }
2676
2677 static enum ndr_err_code ndr_pull_GetIDsOfNames(struct ndr_pull *ndr, int flags, struct GetIDsOfNames *r)
2678 {
2679         uint32_t _ptr_riid;
2680         uint32_t _ptr_rgDispId;
2681         uint32_t cntr_rgDispId_1;
2682         TALLOC_CTX *_mem_save_ORPCthat_0;
2683         TALLOC_CTX *_mem_save_riid_0;
2684         TALLOC_CTX *_mem_save_rgDispId_0;
2685         TALLOC_CTX *_mem_save_rgDispId_1;
2686         if (flags & NDR_IN) {
2687                 ZERO_STRUCT(r->out);
2688
2689                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
2690                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_riid));
2691                 if (_ptr_riid) {
2692                         NDR_PULL_ALLOC(ndr, r->in.riid);
2693                 } else {
2694                         r->in.riid = NULL;
2695                 }
2696                 if (r->in.riid) {
2697                         _mem_save_riid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2698                         NDR_PULL_SET_MEM_CTX(ndr, r->in.riid, 0);
2699                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.riid));
2700                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_riid_0, 0);
2701                 }
2702                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.cNames));
2703                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lcid));
2704                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
2705                 ZERO_STRUCTP(r->out.ORPCthat);
2706         }
2707         if (flags & NDR_OUT) {
2708                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2709                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
2710                 }
2711                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
2712                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
2713                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
2714                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
2715                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rgDispId));
2716                 if (_ptr_rgDispId) {
2717                         NDR_PULL_ALLOC(ndr, r->out.rgDispId);
2718                 } else {
2719                         r->out.rgDispId = NULL;
2720                 }
2721                 if (r->out.rgDispId) {
2722                         _mem_save_rgDispId_0 = NDR_PULL_GET_MEM_CTX(ndr);
2723                         NDR_PULL_SET_MEM_CTX(ndr, r->out.rgDispId, 0);
2724                         NDR_CHECK(ndr_pull_array_size(ndr, &r->out.rgDispId));
2725                         NDR_PULL_ALLOC_N(ndr, r->out.rgDispId, ndr_get_array_size(ndr, &r->out.rgDispId));
2726                         _mem_save_rgDispId_1 = NDR_PULL_GET_MEM_CTX(ndr);
2727                         NDR_PULL_SET_MEM_CTX(ndr, r->out.rgDispId, 0);
2728                         for (cntr_rgDispId_1 = 0; cntr_rgDispId_1 < r->in.cNames; cntr_rgDispId_1++) {
2729                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.rgDispId[cntr_rgDispId_1]));
2730                         }
2731                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rgDispId_1, 0);
2732                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rgDispId_0, 0);
2733                 }
2734                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2735                 if (r->out.rgDispId) {
2736                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.rgDispId, r->in.cNames));
2737                 }
2738         }
2739         return NDR_ERR_SUCCESS;
2740 }
2741
2742 _PUBLIC_ void ndr_print_GetIDsOfNames(struct ndr_print *ndr, const char *name, int flags, const struct GetIDsOfNames *r)
2743 {
2744         uint32_t cntr_rgDispId_1;
2745         ndr_print_struct(ndr, name, "GetIDsOfNames");
2746         ndr->depth++;
2747         if (flags & NDR_SET_VALUES) {
2748                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2749         }
2750         if (flags & NDR_IN) {
2751                 ndr_print_struct(ndr, "in", "GetIDsOfNames");
2752                 ndr->depth++;
2753                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
2754                 ndr_print_ptr(ndr, "riid", r->in.riid);
2755                 ndr->depth++;
2756                 if (r->in.riid) {
2757                         ndr_print_GUID(ndr, "riid", r->in.riid);
2758                 }
2759                 ndr->depth--;
2760                 ndr_print_uint16(ndr, "cNames", r->in.cNames);
2761                 ndr_print_uint32(ndr, "lcid", r->in.lcid);
2762                 ndr->depth--;
2763         }
2764         if (flags & NDR_OUT) {
2765                 ndr_print_struct(ndr, "out", "GetIDsOfNames");
2766                 ndr->depth++;
2767                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
2768                 ndr->depth++;
2769                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
2770                 ndr->depth--;
2771                 ndr_print_ptr(ndr, "rgDispId", r->out.rgDispId);
2772                 ndr->depth++;
2773                 if (r->out.rgDispId) {
2774                         ndr->print(ndr, "%s: ARRAY(%d)", "rgDispId", (int)r->in.cNames);
2775                         ndr->depth++;
2776                         for (cntr_rgDispId_1=0;cntr_rgDispId_1<r->in.cNames;cntr_rgDispId_1++) {
2777                                 char *idx_1=NULL;
2778                                 if (asprintf(&idx_1, "[%d]", cntr_rgDispId_1) != -1) {
2779                                         ndr_print_uint32(ndr, "rgDispId", r->out.rgDispId[cntr_rgDispId_1]);
2780                                         free(idx_1);
2781                                 }
2782                         }
2783                         ndr->depth--;
2784                 }
2785                 ndr->depth--;
2786                 ndr_print_WERROR(ndr, "result", r->out.result);
2787                 ndr->depth--;
2788         }
2789         ndr->depth--;
2790 }
2791
2792 static enum ndr_err_code ndr_push_Invoke(struct ndr_push *ndr, int flags, const struct Invoke *r)
2793 {
2794         if (flags & NDR_IN) {
2795                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
2796                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dispIdMember));
2797                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.riid));
2798                 if (r->in.riid) {
2799                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.riid));
2800                 }
2801                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lcid));
2802                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.wFlags));
2803                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pDispParams));
2804                 if (r->in.pDispParams) {
2805                         NDR_CHECK(ndr_push_DISPPARAMS(ndr, NDR_SCALARS, r->in.pDispParams));
2806                 }
2807         }
2808         if (flags & NDR_OUT) {
2809                 if (r->out.ORPCthat == NULL) {
2810                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2811                 }
2812                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
2813                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pDispParams));
2814                 if (r->out.pDispParams) {
2815                         NDR_CHECK(ndr_push_DISPPARAMS(ndr, NDR_SCALARS, r->out.pDispParams));
2816                 }
2817                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pVarResult));
2818                 if (r->out.pVarResult) {
2819                         NDR_CHECK(ndr_push_VARIANT(ndr, NDR_SCALARS, r->out.pVarResult));
2820                 }
2821                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pExcepInfo));
2822                 if (r->out.pExcepInfo) {
2823                         NDR_CHECK(ndr_push_EXCEPINFO(ndr, NDR_SCALARS, r->out.pExcepInfo));
2824                 }
2825                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.puArgErr));
2826                 if (r->out.puArgErr) {
2827                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.puArgErr));
2828                 }
2829                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2830         }
2831         return NDR_ERR_SUCCESS;
2832 }
2833
2834 static enum ndr_err_code ndr_pull_Invoke(struct ndr_pull *ndr, int flags, struct Invoke *r)
2835 {
2836         uint32_t _ptr_riid;
2837         uint32_t _ptr_pDispParams;
2838         uint32_t _ptr_pVarResult;
2839         uint32_t _ptr_pExcepInfo;
2840         uint32_t _ptr_puArgErr;
2841         TALLOC_CTX *_mem_save_ORPCthat_0;
2842         TALLOC_CTX *_mem_save_riid_0;
2843         TALLOC_CTX *_mem_save_pDispParams_0;
2844         TALLOC_CTX *_mem_save_pVarResult_0;
2845         TALLOC_CTX *_mem_save_pExcepInfo_0;
2846         TALLOC_CTX *_mem_save_puArgErr_0;
2847         if (flags & NDR_IN) {
2848                 ZERO_STRUCT(r->out);
2849
2850                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
2851                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dispIdMember));
2852                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_riid));
2853                 if (_ptr_riid) {
2854                         NDR_PULL_ALLOC(ndr, r->in.riid);
2855                 } else {
2856                         r->in.riid = NULL;
2857                 }
2858                 if (r->in.riid) {
2859                         _mem_save_riid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2860                         NDR_PULL_SET_MEM_CTX(ndr, r->in.riid, 0);
2861                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.riid));
2862                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_riid_0, 0);
2863                 }
2864                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lcid));
2865                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.wFlags));
2866                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDispParams));
2867                 if (_ptr_pDispParams) {
2868                         NDR_PULL_ALLOC(ndr, r->in.pDispParams);
2869                 } else {
2870                         r->in.pDispParams = NULL;
2871                 }
2872                 if (r->in.pDispParams) {
2873                         _mem_save_pDispParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
2874                         NDR_PULL_SET_MEM_CTX(ndr, r->in.pDispParams, 0);
2875                         NDR_CHECK(ndr_pull_DISPPARAMS(ndr, NDR_SCALARS, r->in.pDispParams));
2876                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDispParams_0, 0);
2877                 }
2878                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
2879                 ZERO_STRUCTP(r->out.ORPCthat);
2880         }
2881         if (flags & NDR_OUT) {
2882                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2883                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
2884                 }
2885                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
2886                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
2887                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
2888                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
2889                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDispParams));
2890                 if (_ptr_pDispParams) {
2891                         NDR_PULL_ALLOC(ndr, r->out.pDispParams);
2892                 } else {
2893                         r->out.pDispParams = NULL;
2894                 }
2895                 if (r->out.pDispParams) {
2896                         _mem_save_pDispParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
2897                         NDR_PULL_SET_MEM_CTX(ndr, r->out.pDispParams, 0);
2898                         NDR_CHECK(ndr_pull_DISPPARAMS(ndr, NDR_SCALARS, r->out.pDispParams));
2899                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDispParams_0, 0);
2900                 }
2901                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pVarResult));
2902                 if (_ptr_pVarResult) {
2903                         NDR_PULL_ALLOC(ndr, r->out.pVarResult);
2904                 } else {
2905                         r->out.pVarResult = NULL;
2906                 }
2907                 if (r->out.pVarResult) {
2908                         _mem_save_pVarResult_0 = NDR_PULL_GET_MEM_CTX(ndr);
2909                         NDR_PULL_SET_MEM_CTX(ndr, r->out.pVarResult, 0);
2910                         NDR_CHECK(ndr_pull_VARIANT(ndr, NDR_SCALARS, r->out.pVarResult));
2911                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pVarResult_0, 0);
2912                 }
2913                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pExcepInfo));
2914                 if (_ptr_pExcepInfo) {
2915                         NDR_PULL_ALLOC(ndr, r->out.pExcepInfo);
2916                 } else {
2917                         r->out.pExcepInfo = NULL;
2918                 }
2919                 if (r->out.pExcepInfo) {
2920                         _mem_save_pExcepInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
2921                         NDR_PULL_SET_MEM_CTX(ndr, r->out.pExcepInfo, 0);
2922                         NDR_CHECK(ndr_pull_EXCEPINFO(ndr, NDR_SCALARS, r->out.pExcepInfo));
2923                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pExcepInfo_0, 0);
2924                 }
2925                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_puArgErr));
2926                 if (_ptr_puArgErr) {
2927                         NDR_PULL_ALLOC(ndr, r->out.puArgErr);
2928                 } else {
2929                         r->out.puArgErr = NULL;
2930                 }
2931                 if (r->out.puArgErr) {
2932                         _mem_save_puArgErr_0 = NDR_PULL_GET_MEM_CTX(ndr);
2933                         NDR_PULL_SET_MEM_CTX(ndr, r->out.puArgErr, 0);
2934                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.puArgErr));
2935                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_puArgErr_0, 0);
2936                 }
2937                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2938         }
2939         return NDR_ERR_SUCCESS;
2940 }
2941
2942 _PUBLIC_ void ndr_print_Invoke(struct ndr_print *ndr, const char *name, int flags, const struct Invoke *r)
2943 {
2944         ndr_print_struct(ndr, name, "Invoke");
2945         ndr->depth++;
2946         if (flags & NDR_SET_VALUES) {
2947                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2948         }
2949         if (flags & NDR_IN) {
2950                 ndr_print_struct(ndr, "in", "Invoke");
2951                 ndr->depth++;
2952                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
2953                 ndr_print_uint32(ndr, "dispIdMember", r->in.dispIdMember);
2954                 ndr_print_ptr(ndr, "riid", r->in.riid);
2955                 ndr->depth++;
2956                 if (r->in.riid) {
2957                         ndr_print_GUID(ndr, "riid", r->in.riid);
2958                 }
2959                 ndr->depth--;
2960                 ndr_print_uint32(ndr, "lcid", r->in.lcid);
2961                 ndr_print_uint16(ndr, "wFlags", r->in.wFlags);
2962                 ndr_print_ptr(ndr, "pDispParams", r->in.pDispParams);
2963                 ndr->depth++;
2964                 if (r->in.pDispParams) {
2965                         ndr_print_DISPPARAMS(ndr, "pDispParams", r->in.pDispParams);
2966                 }
2967                 ndr->depth--;
2968                 ndr->depth--;
2969         }
2970         if (flags & NDR_OUT) {
2971                 ndr_print_struct(ndr, "out", "Invoke");
2972                 ndr->depth++;
2973                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
2974                 ndr->depth++;
2975                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
2976                 ndr->depth--;
2977                 ndr_print_ptr(ndr, "pDispParams", r->out.pDispParams);
2978                 ndr->depth++;
2979                 if (r->out.pDispParams) {
2980                         ndr_print_DISPPARAMS(ndr, "pDispParams", r->out.pDispParams);
2981                 }
2982                 ndr->depth--;
2983                 ndr_print_ptr(ndr, "pVarResult", r->out.pVarResult);
2984                 ndr->depth++;
2985                 if (r->out.pVarResult) {
2986                         ndr_print_VARIANT(ndr, "pVarResult", r->out.pVarResult);
2987                 }
2988                 ndr->depth--;
2989                 ndr_print_ptr(ndr, "pExcepInfo", r->out.pExcepInfo);
2990                 ndr->depth++;
2991                 if (r->out.pExcepInfo) {
2992                         ndr_print_EXCEPINFO(ndr, "pExcepInfo", r->out.pExcepInfo);
2993                 }
2994                 ndr->depth--;
2995                 ndr_print_ptr(ndr, "puArgErr", r->out.puArgErr);
2996                 ndr->depth++;
2997                 if (r->out.puArgErr) {
2998                         ndr_print_uint16(ndr, "puArgErr", *r->out.puArgErr);
2999                 }
3000                 ndr->depth--;
3001                 ndr_print_WERROR(ndr, "result", r->out.result);
3002                 ndr->depth--;
3003         }
3004         ndr->depth--;
3005 }
3006
3007 static const struct ndr_interface_call IDispatch_calls[] = {
3008         {
3009                 "GetTypeInfoCount",
3010                 sizeof(struct GetTypeInfoCount),
3011                 (ndr_push_flags_fn_t) ndr_push_GetTypeInfoCount,
3012                 (ndr_pull_flags_fn_t) ndr_pull_GetTypeInfoCount,
3013                 (ndr_print_function_t) ndr_print_GetTypeInfoCount,
3014                 false,
3015         },
3016         {
3017                 "GetTypeInfo",
3018                 sizeof(struct GetTypeInfo),
3019                 (ndr_push_flags_fn_t) ndr_push_GetTypeInfo,
3020                 (ndr_pull_flags_fn_t) ndr_pull_GetTypeInfo,
3021                 (ndr_print_function_t) ndr_print_GetTypeInfo,
3022                 false,
3023         },
3024         {
3025                 "GetIDsOfNames",
3026                 sizeof(struct GetIDsOfNames),
3027                 (ndr_push_flags_fn_t) ndr_push_GetIDsOfNames,
3028                 (ndr_pull_flags_fn_t) ndr_pull_GetIDsOfNames,
3029                 (ndr_print_function_t) ndr_print_GetIDsOfNames,
3030                 false,
3031         },
3032         {
3033                 "Invoke",
3034                 sizeof(struct Invoke),
3035                 (ndr_push_flags_fn_t) ndr_push_Invoke,
3036                 (ndr_pull_flags_fn_t) ndr_pull_Invoke,
3037                 (ndr_print_function_t) ndr_print_Invoke,
3038                 false,
3039         },
3040         { NULL, 0, NULL, NULL, NULL, false }
3041 };
3042
3043 static const char * const IDispatch_endpoint_strings[] = {
3044         "ncacn_np:[\\pipe\\IDispatch]", 
3045 };
3046
3047 static const struct ndr_interface_string_array IDispatch_endpoints = {
3048         .count  = 1,
3049         .names  = IDispatch_endpoint_strings
3050 };
3051
3052 static const char * const IDispatch_authservice_strings[] = {
3053         "host", 
3054 };
3055
3056 static const struct ndr_interface_string_array IDispatch_authservices = {
3057         .count  = 1,
3058         .names  = IDispatch_authservice_strings
3059 };
3060
3061
3062 const struct ndr_interface_table ndr_table_IDispatch = {
3063         .name           = "IDispatch",
3064         .syntax_id      = {
3065                 {0x00020400,0x0000,0x0000,{0xc0,0x00},{0x00,0x00,0x00,0x00,0x00,0x46}},
3066                 NDR_IDISPATCH_VERSION
3067         },
3068         .helpstring     = NDR_IDISPATCH_HELPSTRING,
3069         .num_calls      = 4,
3070         .calls          = IDispatch_calls,
3071         .endpoints      = &IDispatch_endpoints,
3072         .authservices   = &IDispatch_authservices
3073 };
3074
3075 #include "librpc/gen_ndr/ndr_orpc.h"
3076 static enum ndr_err_code ndr_push_MarshalInterface(struct ndr_push *ndr, int flags, const struct MarshalInterface *r)
3077 {
3078         if (flags & NDR_IN) {
3079                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
3080         }
3081         if (flags & NDR_OUT) {
3082                 if (r->out.ORPCthat == NULL) {
3083                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3084                 }
3085                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
3086                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3087         }
3088         return NDR_ERR_SUCCESS;
3089 }
3090
3091 static enum ndr_err_code ndr_pull_MarshalInterface(struct ndr_pull *ndr, int flags, struct MarshalInterface *r)
3092 {
3093         TALLOC_CTX *_mem_save_ORPCthat_0;
3094         if (flags & NDR_IN) {
3095                 ZERO_STRUCT(r->out);
3096
3097                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
3098                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
3099                 ZERO_STRUCTP(r->out.ORPCthat);
3100         }
3101         if (flags & NDR_OUT) {
3102                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3103                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
3104                 }
3105                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
3106                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
3107                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
3108                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
3109                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3110         }
3111         return NDR_ERR_SUCCESS;
3112 }
3113
3114 _PUBLIC_ void ndr_print_MarshalInterface(struct ndr_print *ndr, const char *name, int flags, const struct MarshalInterface *r)
3115 {
3116         ndr_print_struct(ndr, name, "MarshalInterface");
3117         ndr->depth++;
3118         if (flags & NDR_SET_VALUES) {
3119                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3120         }
3121         if (flags & NDR_IN) {
3122                 ndr_print_struct(ndr, "in", "MarshalInterface");
3123                 ndr->depth++;
3124                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
3125                 ndr->depth--;
3126         }
3127         if (flags & NDR_OUT) {
3128                 ndr_print_struct(ndr, "out", "MarshalInterface");
3129                 ndr->depth++;
3130                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
3131                 ndr->depth++;
3132                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
3133                 ndr->depth--;
3134                 ndr_print_WERROR(ndr, "result", r->out.result);
3135                 ndr->depth--;
3136         }
3137         ndr->depth--;
3138 }
3139
3140 static enum ndr_err_code ndr_push_UnMarshalInterface(struct ndr_push *ndr, int flags, const struct UnMarshalInterface *r)
3141 {
3142         if (flags & NDR_IN) {
3143                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
3144         }
3145         if (flags & NDR_OUT) {
3146                 if (r->out.ORPCthat == NULL) {
3147                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3148                 }
3149                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
3150                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3151         }
3152         return NDR_ERR_SUCCESS;
3153 }
3154
3155 static enum ndr_err_code ndr_pull_UnMarshalInterface(struct ndr_pull *ndr, int flags, struct UnMarshalInterface *r)
3156 {
3157         TALLOC_CTX *_mem_save_ORPCthat_0;
3158         if (flags & NDR_IN) {
3159                 ZERO_STRUCT(r->out);
3160
3161                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
3162                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
3163                 ZERO_STRUCTP(r->out.ORPCthat);
3164         }
3165         if (flags & NDR_OUT) {
3166                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3167                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
3168                 }
3169                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
3170                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
3171                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
3172                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
3173                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3174         }
3175         return NDR_ERR_SUCCESS;
3176 }
3177
3178 _PUBLIC_ void ndr_print_UnMarshalInterface(struct ndr_print *ndr, const char *name, int flags, const struct UnMarshalInterface *r)
3179 {
3180         ndr_print_struct(ndr, name, "UnMarshalInterface");
3181         ndr->depth++;
3182         if (flags & NDR_SET_VALUES) {
3183                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3184         }
3185         if (flags & NDR_IN) {
3186                 ndr_print_struct(ndr, "in", "UnMarshalInterface");
3187                 ndr->depth++;
3188                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
3189                 ndr->depth--;
3190         }
3191         if (flags & NDR_OUT) {
3192                 ndr_print_struct(ndr, "out", "UnMarshalInterface");
3193                 ndr->depth++;
3194                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
3195                 ndr->depth++;
3196                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
3197                 ndr->depth--;
3198                 ndr_print_WERROR(ndr, "result", r->out.result);
3199                 ndr->depth--;
3200         }
3201         ndr->depth--;
3202 }
3203
3204 static const struct ndr_interface_call IMarshal_calls[] = {
3205         {
3206                 "MarshalInterface",
3207                 sizeof(struct MarshalInterface),
3208                 (ndr_push_flags_fn_t) ndr_push_MarshalInterface,
3209                 (ndr_pull_flags_fn_t) ndr_pull_MarshalInterface,
3210                 (ndr_print_function_t) ndr_print_MarshalInterface,
3211                 false,
3212         },
3213         {
3214                 "UnMarshalInterface",
3215                 sizeof(struct UnMarshalInterface),
3216                 (ndr_push_flags_fn_t) ndr_push_UnMarshalInterface,
3217                 (ndr_pull_flags_fn_t) ndr_pull_UnMarshalInterface,
3218                 (ndr_print_function_t) ndr_print_UnMarshalInterface,
3219                 false,
3220         },
3221         { NULL, 0, NULL, NULL, NULL, false }
3222 };
3223
3224 static const char * const IMarshal_endpoint_strings[] = {
3225         "ncacn_np:[\\pipe\\IMarshal]", 
3226 };
3227
3228 static const struct ndr_interface_string_array IMarshal_endpoints = {
3229         .count  = 1,
3230         .names  = IMarshal_endpoint_strings
3231 };
3232
3233 static const char * const IMarshal_authservice_strings[] = {
3234         "host", 
3235 };
3236
3237 static const struct ndr_interface_string_array IMarshal_authservices = {
3238         .count  = 1,
3239         .names  = IMarshal_authservice_strings
3240 };
3241
3242
3243 const struct ndr_interface_table ndr_table_IMarshal = {
3244         .name           = "IMarshal",
3245         .syntax_id      = {
3246                 {0x00000003,0x0000,0x0000,{0xc0,0x00},{0x00,0x00,0x00,0x00,0x00,0x46}},
3247                 NDR_IMARSHAL_VERSION
3248         },
3249         .helpstring     = NDR_IMARSHAL_HELPSTRING,
3250         .num_calls      = 2,
3251         .calls          = IMarshal_calls,
3252         .endpoints      = &IMarshal_endpoints,
3253         .authservices   = &IMarshal_authservices
3254 };
3255
3256 #include "librpc/gen_ndr/ndr_orpc.h"
3257 static enum ndr_err_code ndr_push_MakeCoffee(struct ndr_push *ndr, int flags, const struct MakeCoffee *r)
3258 {
3259         if (flags & NDR_IN) {
3260                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
3261                 if (r->in.flavor == NULL) {
3262                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3263                 }
3264                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.flavor, CH_UTF16)));
3265                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3266                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.flavor, CH_UTF16)));
3267                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.flavor, ndr_charset_length(r->in.flavor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3268         }
3269         if (flags & NDR_OUT) {
3270                 if (r->out.ORPCthat == NULL) {
3271                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3272                 }
3273                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
3274                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3275         }
3276         return NDR_ERR_SUCCESS;
3277 }
3278
3279 static enum ndr_err_code ndr_pull_MakeCoffee(struct ndr_pull *ndr, int flags, struct MakeCoffee *r)
3280 {
3281         TALLOC_CTX *_mem_save_ORPCthat_0;
3282         if (flags & NDR_IN) {
3283                 ZERO_STRUCT(r->out);
3284
3285                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
3286                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.flavor));
3287                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.flavor));
3288                 if (ndr_get_array_length(ndr, &r->in.flavor) > ndr_get_array_size(ndr, &r->in.flavor)) {
3289                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.flavor), ndr_get_array_length(ndr, &r->in.flavor));
3290                 }
3291                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.flavor), sizeof(uint16_t)));
3292                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.flavor, ndr_get_array_length(ndr, &r->in.flavor), sizeof(uint16_t), CH_UTF16));
3293                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
3294                 ZERO_STRUCTP(r->out.ORPCthat);
3295         }
3296         if (flags & NDR_OUT) {
3297                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3298                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
3299                 }
3300                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
3301                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
3302                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
3303                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
3304                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3305         }
3306         return NDR_ERR_SUCCESS;
3307 }
3308
3309 _PUBLIC_ void ndr_print_MakeCoffee(struct ndr_print *ndr, const char *name, int flags, const struct MakeCoffee *r)
3310 {
3311         ndr_print_struct(ndr, name, "MakeCoffee");
3312         ndr->depth++;
3313         if (flags & NDR_SET_VALUES) {
3314                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3315         }
3316         if (flags & NDR_IN) {
3317                 ndr_print_struct(ndr, "in", "MakeCoffee");
3318                 ndr->depth++;
3319                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
3320                 ndr_print_ptr(ndr, "flavor", r->in.flavor);
3321                 ndr->depth++;
3322                 ndr_print_string(ndr, "flavor", r->in.flavor);
3323                 ndr->depth--;
3324                 ndr->depth--;
3325         }
3326         if (flags & NDR_OUT) {
3327                 ndr_print_struct(ndr, "out", "MakeCoffee");
3328                 ndr->depth++;
3329                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
3330                 ndr->depth++;
3331                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
3332                 ndr->depth--;
3333                 ndr_print_WERROR(ndr, "result", r->out.result);
3334                 ndr->depth--;
3335         }
3336         ndr->depth--;
3337 }
3338
3339 static const struct ndr_interface_call ICoffeeMachine_calls[] = {
3340         {
3341                 "MakeCoffee",
3342                 sizeof(struct MakeCoffee),
3343                 (ndr_push_flags_fn_t) ndr_push_MakeCoffee,
3344                 (ndr_pull_flags_fn_t) ndr_pull_MakeCoffee,
3345                 (ndr_print_function_t) ndr_print_MakeCoffee,
3346                 false,
3347         },
3348         { NULL, 0, NULL, NULL, NULL, false }
3349 };
3350
3351 static const char * const ICoffeeMachine_endpoint_strings[] = {
3352         "ncacn_np:[\\pipe\\ICoffeeMachine]", 
3353 };
3354
3355 static const struct ndr_interface_string_array ICoffeeMachine_endpoints = {
3356         .count  = 1,
3357         .names  = ICoffeeMachine_endpoint_strings
3358 };
3359
3360 static const char * const ICoffeeMachine_authservice_strings[] = {
3361         "host", 
3362 };
3363
3364 static const struct ndr_interface_string_array ICoffeeMachine_authservices = {
3365         .count  = 1,
3366         .names  = ICoffeeMachine_authservice_strings
3367 };
3368
3369
3370 const struct ndr_interface_table ndr_table_ICoffeeMachine = {
3371         .name           = "ICoffeeMachine",
3372         .syntax_id      = {
3373                 {0xda23f6db,0x6f45,0x466c,{0x9e,0xed},{0x0b,0x65,0x28,0x6f,0x2d,0x78}},
3374                 NDR_ICOFFEEMACHINE_VERSION
3375         },
3376         .helpstring     = NDR_ICOFFEEMACHINE_HELPSTRING,
3377         .num_calls      = 1,
3378         .calls          = ICoffeeMachine_calls,
3379         .endpoints      = &ICoffeeMachine_endpoints,
3380         .authservices   = &ICoffeeMachine_authservices
3381 };
3382
3383 #include "librpc/gen_ndr/ndr_orpc.h"
3384 static enum ndr_err_code ndr_push_Read(struct ndr_push *ndr, int flags, const struct Read *r)
3385 {
3386         if (flags & NDR_IN) {
3387                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
3388                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_requested));
3389                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.num_readx));
3390                 if (r->in.num_readx) {
3391                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.num_readx));
3392                 }
3393         }
3394         if (flags & NDR_OUT) {
3395                 if (r->out.ORPCthat == NULL) {
3396                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3397                 }
3398                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
3399                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_requested));
3400                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3401                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.num_read));
3402                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pv, *r->out.num_read));
3403                 if (r->out.num_read == NULL) {
3404                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3405                 }
3406                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_read));
3407                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3408         }
3409         return NDR_ERR_SUCCESS;
3410 }
3411
3412 static enum ndr_err_code ndr_pull_Read(struct ndr_pull *ndr, int flags, struct Read *r)
3413 {
3414         uint32_t _ptr_num_readx;
3415         TALLOC_CTX *_mem_save_ORPCthat_0;
3416         TALLOC_CTX *_mem_save_num_readx_0;
3417         TALLOC_CTX *_mem_save_num_read_0;
3418         if (flags & NDR_IN) {
3419                 ZERO_STRUCT(r->out);
3420
3421                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
3422                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_requested));
3423                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_num_readx));
3424                 if (_ptr_num_readx) {
3425                         NDR_PULL_ALLOC(ndr, r->in.num_readx);
3426                 } else {
3427                         r->in.num_readx = NULL;
3428                 }
3429                 if (r->in.num_readx) {
3430                         _mem_save_num_readx_0 = NDR_PULL_GET_MEM_CTX(ndr);
3431                         NDR_PULL_SET_MEM_CTX(ndr, r->in.num_readx, 0);
3432                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.num_readx));
3433                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_readx_0, 0);
3434                 }
3435                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
3436                 ZERO_STRUCTP(r->out.ORPCthat);
3437                 NDR_PULL_ALLOC(ndr, r->out.num_read);
3438                 ZERO_STRUCTP(r->out.num_read);
3439         }
3440         if (flags & NDR_OUT) {
3441                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3442                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
3443                 }
3444                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
3445                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
3446                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
3447                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
3448                 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pv));
3449                 NDR_CHECK(ndr_pull_array_length(ndr, &r->out.pv));
3450                 if (ndr_get_array_length(ndr, &r->out.pv) > ndr_get_array_size(ndr, &r->out.pv)) {
3451                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.pv), ndr_get_array_length(ndr, &r->out.pv));
3452                 }
3453                 NDR_PULL_ALLOC_N(ndr, r->out.pv, ndr_get_array_size(ndr, &r->out.pv));
3454                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pv, ndr_get_array_length(ndr, &r->out.pv)));
3455                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3456                         NDR_PULL_ALLOC(ndr, r->out.num_read);
3457                 }
3458                 _mem_save_num_read_0 = NDR_PULL_GET_MEM_CTX(ndr);
3459                 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_read, LIBNDR_FLAG_REF_ALLOC);
3460                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_read));
3461                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_read_0, LIBNDR_FLAG_REF_ALLOC);
3462                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3463                 if (r->out.pv) {
3464                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.pv, r->in.num_requested));
3465                 }
3466                 if (r->out.pv) {
3467                         NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.pv, *r->out.num_read));
3468                 }
3469         }
3470         return NDR_ERR_SUCCESS;
3471 }
3472
3473 _PUBLIC_ void ndr_print_Read(struct ndr_print *ndr, const char *name, int flags, const struct Read *r)
3474 {
3475         ndr_print_struct(ndr, name, "Read");
3476         ndr->depth++;
3477         if (flags & NDR_SET_VALUES) {
3478                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3479         }
3480         if (flags & NDR_IN) {
3481                 ndr_print_struct(ndr, "in", "Read");
3482                 ndr->depth++;
3483                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
3484                 ndr_print_uint32(ndr, "num_requested", r->in.num_requested);
3485                 ndr_print_ptr(ndr, "num_readx", r->in.num_readx);
3486                 ndr->depth++;
3487                 if (r->in.num_readx) {
3488                         ndr_print_uint32(ndr, "num_readx", *r->in.num_readx);
3489                 }
3490                 ndr->depth--;
3491                 ndr->depth--;
3492         }
3493         if (flags & NDR_OUT) {
3494                 ndr_print_struct(ndr, "out", "Read");
3495                 ndr->depth++;
3496                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
3497                 ndr->depth++;
3498                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
3499                 ndr->depth--;
3500                 ndr_print_array_uint8(ndr, "pv", r->out.pv, *r->out.num_read);
3501                 ndr_print_ptr(ndr, "num_read", r->out.num_read);
3502                 ndr->depth++;
3503                 ndr_print_uint32(ndr, "num_read", *r->out.num_read);
3504                 ndr->depth--;
3505                 ndr_print_WERROR(ndr, "result", r->out.result);
3506                 ndr->depth--;
3507         }
3508         ndr->depth--;
3509 }
3510
3511 static enum ndr_err_code ndr_push_Write(struct ndr_push *ndr, int flags, const struct Write *r)
3512 {
3513         if (flags & NDR_IN) {
3514                 NDR_CHECK(ndr_push_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
3515                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
3516                 if (r->in.data) {
3517                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_requested));
3518                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.num_requested));
3519                 }
3520                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_requested));
3521         }
3522         if (flags & NDR_OUT) {
3523                 if (r->out.ORPCthat == NULL) {
3524                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3525                 }
3526                 NDR_CHECK(ndr_push_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
3527                 if (r->out.num_written == NULL) {
3528                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3529                 }
3530                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_written));
3531                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3532         }
3533         return NDR_ERR_SUCCESS;
3534 }
3535
3536 static enum ndr_err_code ndr_pull_Write(struct ndr_pull *ndr, int flags, struct Write *r)
3537 {
3538         uint32_t _ptr_data;
3539         TALLOC_CTX *_mem_save_ORPCthat_0;
3540         TALLOC_CTX *_mem_save_data_0;
3541         TALLOC_CTX *_mem_save_num_written_0;
3542         if (flags & NDR_IN) {
3543                 ZERO_STRUCT(r->out);
3544
3545                 NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ORPCthis));
3546                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
3547                 if (_ptr_data) {
3548                         NDR_PULL_ALLOC(ndr, r->in.data);
3549                 } else {
3550                         r->in.data = NULL;
3551                 }
3552                 if (r->in.data) {
3553                         _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
3554                         NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
3555                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
3556                         NDR_PULL_ALLOC_N(ndr, r->in.data, ndr_get_array_size(ndr, &r->in.data));
3557                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, ndr_get_array_size(ndr, &r->in.data)));
3558                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
3559                 }
3560                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_requested));
3561                 NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
3562                 ZERO_STRUCTP(r->out.ORPCthat);
3563                 NDR_PULL_ALLOC(ndr, r->out.num_written);
3564                 ZERO_STRUCTP(r->out.num_written);
3565                 if (r->in.data) {
3566                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.num_requested));
3567                 }
3568         }
3569         if (flags & NDR_OUT) {
3570                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3571                         NDR_PULL_ALLOC(ndr, r->out.ORPCthat);
3572                 }
3573                 _mem_save_ORPCthat_0 = NDR_PULL_GET_MEM_CTX(ndr);
3574                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ORPCthat, LIBNDR_FLAG_REF_ALLOC);
3575                 NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ORPCthat));
3576                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ORPCthat_0, LIBNDR_FLAG_REF_ALLOC);
3577                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3578                         NDR_PULL_ALLOC(ndr, r->out.num_written);
3579                 }
3580                 _mem_save_num_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
3581                 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_written, LIBNDR_FLAG_REF_ALLOC);
3582                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_written));
3583                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_written_0, LIBNDR_FLAG_REF_ALLOC);
3584                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3585         }
3586         return NDR_ERR_SUCCESS;
3587 }
3588
3589 _PUBLIC_ void ndr_print_Write(struct ndr_print *ndr, const char *name, int flags, const struct Write *r)
3590 {
3591         ndr_print_struct(ndr, name, "Write");
3592         ndr->depth++;
3593         if (flags & NDR_SET_VALUES) {
3594                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3595         }
3596         if (flags & NDR_IN) {
3597                 ndr_print_struct(ndr, "in", "Write");
3598                 ndr->depth++;
3599                 ndr_print_ORPCTHIS(ndr, "ORPCthis", &r->in.ORPCthis);
3600                 ndr_print_ptr(ndr, "data", r->in.data);
3601                 ndr->depth++;
3602                 if (r->in.data) {
3603                         ndr_print_array_uint8(ndr, "data", r->in.data, r->in.num_requested);
3604                 }
3605                 ndr->depth--;
3606                 ndr_print_uint32(ndr, "num_requested", r->in.num_requested);
3607                 ndr->depth--;
3608         }
3609         if (flags & NDR_OUT) {
3610                 ndr_print_struct(ndr, "out", "Write");
3611                 ndr->depth++;
3612                 ndr_print_ptr(ndr, "ORPCthat", r->out.ORPCthat);
3613                 ndr->depth++;
3614                 ndr_print_ORPCTHAT(ndr, "ORPCthat", r->out.ORPCthat);
3615                 ndr->depth--;
3616                 ndr_print_ptr(ndr, "num_written", r->out.num_written);
3617                 ndr->depth++;
3618                 ndr_print_uint32(ndr, "num_written", *r->out.num_written);
3619                 ndr->depth--;
3620                 ndr_print_WERROR(ndr, "result", r->out.result);
3621                 ndr->depth--;
3622         }
3623         ndr->depth--;
3624 }
3625
3626 static const struct ndr_interface_call IStream_calls[] = {
3627         {
3628                 "Read",
3629                 sizeof(struct Read),
3630                 (ndr_push_flags_fn_t) ndr_push_Read,
3631                 (ndr_pull_flags_fn_t) ndr_pull_Read,
3632                 (ndr_print_function_t) ndr_print_Read,
3633                 false,
3634         },
3635         {
3636                 "Write",
3637                 sizeof(struct Write),
3638                 (ndr_push_flags_fn_t) ndr_push_Write,
3639                 (ndr_pull_flags_fn_t) ndr_pull_Write,
3640                 (ndr_print_function_t) ndr_print_Write,
3641                 false,
3642         },
3643         { NULL, 0, NULL, NULL, NULL, false }
3644 };
3645
3646 static const char * const IStream_endpoint_strings[] = {
3647         "ncacn_np:[\\pipe\\IStream]", 
3648 };
3649
3650 static const struct ndr_interface_string_array IStream_endpoints = {
3651         .count  = 1,
3652         .names  = IStream_endpoint_strings
3653 };
3654
3655 static const char * const IStream_authservice_strings[] = {
3656         "host", 
3657 };
3658
3659 static const struct ndr_interface_string_array IStream_authservices = {
3660         .count  = 1,
3661         .names  = IStream_authservice_strings
3662 };
3663
3664
3665 const struct ndr_interface_table ndr_table_IStream = {
3666         .name           = "IStream",
3667         .syntax_id      = {
3668                 {0x0000000c,0x0000,0x0000,{0xc0,0x00},{0x00,0x00,0x00,0x00,0x00,0x46}},
3669                 NDR_ISTREAM_VERSION
3670         },
3671         .helpstring     = NDR_ISTREAM_HELPSTRING,
3672         .num_calls      = 2,
3673         .calls          = IStream_calls,
3674         .endpoints      = &IStream_endpoints,
3675         .authservices   = &IStream_authservices
3676 };
3677