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