testprogs/win32/rpcecho-win32-pipe ...
authorStefan Metzmacher <metze@samba.org>
Tue, 28 Sep 2010 07:53:09 +0000 (09:53 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Jun 2019 11:15:20 +0000 (13:15 +0200)
19 files changed:
testprogs/win32/rpcecho-win32-pipe/.cvsignore [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/CVS/Entries [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/CVS/Repository [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/CVS/Root [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/Makefile.bak [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/README [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/client.c [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/client.c.bak [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/rpcecho.acf [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/rpcecho.h [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/rpcecho.idl [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/rpcecho.idl.bak [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/rpcecho_c.c [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/rpcecho_c.c.bak [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/rpcecho_s.c [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/rpcecho_s.c.bak [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/server.c [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/server.c.bak [new file with mode: 0755]
testprogs/win32/rpcecho-win32-pipe/utils.c [new file with mode: 0755]

diff --git a/testprogs/win32/rpcecho-win32-pipe/.cvsignore b/testprogs/win32/rpcecho-win32-pipe/.cvsignore
new file mode 100755 (executable)
index 0000000..65e31f0
--- /dev/null
@@ -0,0 +1,6 @@
+Debug
+rpcecho.h
+*.ncb
+*_c.c
+*_s.c
+*.obj
diff --git a/testprogs/win32/rpcecho-win32-pipe/CVS/Entries b/testprogs/win32/rpcecho-win32-pipe/CVS/Entries
new file mode 100755 (executable)
index 0000000..79a9d33
--- /dev/null
@@ -0,0 +1,11 @@
+/.cvsignore/1.3/Fri Nov 14 21:23:55 2003//
+/Makefile/1.2/Wed Jun 16 03:21:59 2004//
+/README/1.2/Fri Nov 14 21:23:55 2003//
+/client.c/1.7/Mon Sep 13 03:00:30 2004//
+/client.exe/1.4/Mon Sep 13 03:00:30 2004/-kb/
+/rpcecho.acf/1.2/Mon Sep 13 03:00:30 2004//
+/rpcecho.idl/1.5/Mon Aug 30 07:37:37 2004//
+/server.c/1.6/Mon Sep 13 03:00:30 2004//
+/server.exe/1.5/Mon Sep 13 03:00:30 2004/-kb/
+/utils.c/1.1/Fri Apr 11 03:19:54 2003//
+D
diff --git a/testprogs/win32/rpcecho-win32-pipe/CVS/Repository b/testprogs/win32/rpcecho-win32-pipe/CVS/Repository
new file mode 100755 (executable)
index 0000000..4afb18f
--- /dev/null
@@ -0,0 +1 @@
+junkcode/rpcecho-win32
diff --git a/testprogs/win32/rpcecho-win32-pipe/CVS/Root b/testprogs/win32/rpcecho-win32-pipe/CVS/Root
new file mode 100755 (executable)
index 0000000..1cfede3
--- /dev/null
@@ -0,0 +1 @@
+cvs.samba.org:/home/cvs
diff --git a/testprogs/win32/rpcecho-win32-pipe/Makefile.bak b/testprogs/win32/rpcecho-win32-pipe/Makefile.bak
new file mode 100755 (executable)
index 0000000..ee93832
--- /dev/null
@@ -0,0 +1,24 @@
+#CC=E:\VC98\bin\cl -nologo
+INCLUDES=-I
+CFLAGS=$(INCLUDES) -Zi
+LIBS=rpcrt4.lib /ML ntdsapi.lib
+
+all: client server
+
+clean:
+       del *~ *.obj client server rpcecho_c.c rpcecho_s.c rpcecho.h
+
+rpcecho.h rpcecho_s.c rpcecho_c.c: rpcecho.idl rpcecho.acf
+       midl /target NT50 /acf rpcecho.acf rpcecho.idl
+
+client: client.obj rpcecho_c.obj utils.obj
+       $(CC) -DTARGET_IS_NT50_OR_LATER -o client client.obj rpcecho_c.obj utils.obj $(LIBS)
+
+server: server.obj rpcecho_s.obj utils.obj
+       $(CC) -DTARGET_IS_NT50_OR_LATER -o server server.obj rpcecho_s.obj utils.obj $(LIBS)
+
+client.obj: rpcecho.h client.c
+server.obj: rpcecho.h server.c
+rpcecho_c.obj: rpcecho.h rpcecho_c.c
+rpcecho_s.obj: rpcecho.h rpcecho_s.c
+utils.obj: rpcecho.h utils.c
diff --git a/testprogs/win32/rpcecho-win32-pipe/README b/testprogs/win32/rpcecho-win32-pipe/README
new file mode 100755 (executable)
index 0000000..3157783
--- /dev/null
@@ -0,0 +1,46 @@
+This directory contains two win32 programs to test large RPC requests
+and responses.  The two programs are:
+
+  server        A command line RPC server that listens and processes
+                RPC requests on the \pipe\rpcecho named pipe.
+
+  client        A command line RPC client program that
+
+Samba also implements the client and server sides of the rpcecho pipe
+if the --enable-developer option to configure has been used.  The
+rpcclient(1) program is used to implement the client side RPC
+operations.
+
+There are currently four RPC calls defined in the rpcecho pipe.  They
+are:
+
+  AddOne       Adds one to an integer sent by the client
+
+  EchoData     The client sends an array of bytes and it is echoed
+               back by the server.
+
+  SourceData   The client sends an array of bytes and it is discarded
+               by the server.
+
+  SinkData     The server returns an array of bytes.
+
+The Ethereal network protocol decoder (http://www.ethereal.com/) also
+contains support for the rpcecho pipe as part of its DCERPC for
+Windows.
+
+Starting the win32 server program is easy.  Just run server.exe in a
+command window.  The win32 client program is also run from a command
+window.  The usage information is shown below:
+
+  Usage: client hostname cmd [args]
+
+  Where hostname is the name of the host to connect to,
+  and cmd is the command to execute with optional args:
+
+       addone num      Add one to num and return the result
+       echodata size   Send an array of size bytes and receive it back
+       sinkdata size   Send an array of size bytes
+       sourcedata size Receive an array of size bytes
+
+Tim Potter
+tpot@samba.org
diff --git a/testprogs/win32/rpcecho-win32-pipe/client.c b/testprogs/win32/rpcecho-win32-pipe/client.c
new file mode 100755 (executable)
index 0000000..f3327af
--- /dev/null
@@ -0,0 +1,383 @@
+/*
+   RPC echo client.
+
+   Copyright (C) Tim Potter 2003
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include "rpcecho.h"
+#include <NtDsApi.h>
+
+void main(int argc, char **argv)
+{
+       RPC_STATUS status;
+       DWORD dwStatus;
+       char *binding = NULL;
+       const char *username=NULL;
+       const char *password=NULL;
+       const char *domain=NULL;
+#define SERVER_PRINC_LEN 1024
+       unsigned server_princ_len = SERVER_PRINC_LEN;
+       char server_princ[SERVER_PRINC_LEN];
+       unsigned sec_options = RPC_C_AUTHN_LEVEL_DEFAULT;
+       unsigned sec_proto = RPC_C_AUTHN_DEFAULT;
+
+       argv += 1;
+       argc -= 1;
+
+       while (argc > 2 && argv[0][0] == '-') {
+               const char *option;
+
+               switch (argv[0][1]) {
+               case 'e':
+                       binding = argv[1];
+                       break;
+               case 'u':
+                       username = argv[1];
+                       break;
+               case 'p':
+                       password = argv[1];
+                       break;
+               case 'd':
+                       domain = argv[1];
+                       break;
+               case '-':
+                       option = &argv[0][2];
+                       if (strcmp(option, "connect") == 0) {
+                               if (sec_options != RPC_C_AUTHN_LEVEL_DEFAULT) {
+                                       printf("You must choose connect, sign or seal, not more than one\n");
+                                       exit(1);
+                               }
+                               sec_options = RPC_C_AUTHN_LEVEL_CONNECT;
+                       } else if (strcmp(option, "sign") == 0) {
+                               if (sec_options != RPC_C_AUTHN_LEVEL_DEFAULT) {
+                                       printf("You must choose connect, sign or seal, not more than one\n");
+                                       exit(1);
+                               }
+                               sec_options = RPC_C_AUTHN_LEVEL_PKT_INTEGRITY;
+                       } else if (strcmp(option, "seal") == 0) {
+                               if (sec_options != RPC_C_AUTHN_LEVEL_DEFAULT) {
+                                       printf("You must choose connect, sign or seal, not more than one\n");
+                                       exit(1);
+                               }
+                               sec_options = RPC_C_AUTHN_LEVEL_PKT_PRIVACY;
+                       } else if (strcmp(option, "spnego") == 0) {
+                               if (sec_proto != RPC_C_AUTHN_DEFAULT) {
+                                       printf("You must choose spnego,ntlmssp or krb5, not more than one\n");
+                                       exit(1);
+                               }
+#ifdef RPC_C_AUTHN_GSS_NEGOTIATE
+                               sec_proto = RPC_C_AUTHN_GSS_NEGOTIATE;
+#else
+                               printf("Sorry --spnego RPC_C_AUTHN_GSS_NEGOTIATE is not compiled in\n");
+                               exit(1);
+#endif
+                       } else if (strcmp(option, "ntlmssp") == 0) {
+                               if (sec_proto != RPC_C_AUTHN_DEFAULT) {
+                                       printf("You must choose spnego,ntlmssp or krb5, not more than one\n");
+                                       exit(1);
+                               }
+                               sec_proto = RPC_C_AUTHN_WINNT;
+                       } else if (strcmp(option, "krb5") == 0) {
+                               if (sec_proto != RPC_C_AUTHN_DEFAULT) {
+                                       printf("You must choose spnego,ntlmssp or krb5, not more than one\n");
+                                       exit(1);
+                               }
+#ifdef RPC_C_AUTHN_GSS_KERBEROS
+                               sec_proto = RPC_C_AUTHN_GSS_KERBEROS;
+#else
+                               printf("Sorry --krb5 RPC_C_AUTHN_GSS_KERBEROS is not compiled in\n");
+                               exit(1);
+#endif
+                       } else {
+                               printf("Bad security option '%s'\n", option);
+                               exit(1);
+                       }
+                       argv++;
+                       argc--;
+                       continue;
+               default:
+                       printf("Bad option -%c\n", argv[0][0]);
+                       exit(1);
+               }
+               argv += 2;
+               argc -= 2;
+       }
+
+       if (argc < 2) {
+               printf("Usage: client [options] hostname cmd [args]\n\n");
+               printf("Where hostname is the name of the host to connect to,\n");
+               printf("and cmd is the command to execute with optional args:\n\n");
+               printf("\taddone num\tAdd one to num and return the result\n");
+               printf("\techodata size\tSend an array of size bytes and receive it back\n");
+               printf("\tsinkdata size\tSend an array of size bytes\n");
+               printf("\tsourcedata size\tReceive an array of size bytes\n");
+               printf("\ttest\trun testcall\n");
+               printf("\noptions:\n");
+               printf("\t-u username -d domain -p password -e endpoint\n");
+               printf("\t--connect --sign --seal\n");
+               printf("\t--spnego --ntlmssp --krb5\n");
+               printf("\nExamples:\n");
+               printf("\tclient HOSTNAME addone 3\n");
+               printf("\tclient 192.168.115.1 addone 3\n");
+               printf("\tclient -e ncacn_np:HOSTNAME[\\\\pipe\\\\rpcecho] addone 3\n");
+               printf("\tclient -e ncacn_ip_tcp:192.168.115.1 addone 3\n");
+               printf("\tclient -e ncacn_ip_tcp:192.168.115.1 -u tridge -d MYDOMAIN -p PASSWORD addone 3\n");
+               exit(0);
+       }
+
+
+       if (!binding) {
+               char *network_address = argv[0];
+
+               argc--;
+               argv++;
+
+               status = RpcStringBindingCompose(
+                       NULL, /* uuid */
+                       "ncacn_np",
+                       network_address,
+                       "\\pipe\\rpcecho",
+                       NULL, /* options */
+                       &binding);
+
+               if (status) {
+                       printf("RpcStringBindingCompose returned %d\n", status);
+                       exit(status);
+               }
+       }
+
+       printf("Endpoint is %s\n", binding);
+
+       status = RpcBindingFromStringBinding(
+                       binding,
+                       &rpcecho_IfHandle);
+
+       if (status) {
+               printf("RpcBindingFromStringBinding returned %d\n", status);
+               exit(status);
+       }
+
+       if (username) {
+               SEC_WINNT_AUTH_IDENTITY ident = { username, strlen(username),
+                                                 domain, strlen(domain),
+                                                 password, strlen(password),
+                                                 SEC_WINNT_AUTH_IDENTITY_ANSI };
+
+               dwStatus = DsMakeSpn("ldap",
+                                    "w2k3-101.w2k3.vmnet1.vm.base",
+                                    NULL,
+                                    0,
+                                    NULL,
+                                    &server_princ_len,
+                                    server_princ);
+
+               status = RpcBindingSetAuthInfo(rpcecho_IfHandle,
+                                              server_princ,
+                                              sec_options,
+                                              sec_proto,
+                                              &ident, 0);
+               if (status) {
+                       printf ("RpcBindingSetAuthInfo failed: 0x%x\n", status);
+                       exit (1);
+               }
+       }
+
+
+       while (argc > 0) {
+       RpcTryExcept {
+
+               /* Add one to a number */
+
+               if (strcmp(argv[0], "addone") == 0) {
+                       int arg, result;
+
+                       if (argc < 2) {
+                               printf("Usage: addone num\n");
+                               exit(1);
+                       }
+
+                       arg = atoi(argv[1]);
+
+                       AddOne(0, 0, &result);
+                       printf("%d + 1 = %d\n", arg, result);
+
+                       argc -= 2;
+                       argv += 2;
+                       continue;
+               }
+
+               /* Echo an array */
+
+               if (strcmp(argv[0], "echodata") == 0) {
+                       int arg, i;
+                       char *indata, *outdata;
+
+                       if (argc < 2) {
+                               printf("Usage: echo num\n");
+                               exit(1);
+                       }
+
+                       arg = atoi(argv[1]);
+
+                       if ((indata = malloc(arg)) == NULL) {
+                               printf("Error allocating %d bytes for input\n", arg);
+                               exit(1);
+                       }
+
+                       if ((outdata = malloc(arg)) == NULL) {
+                               printf("Error allocating %d bytes for output\n", arg);
+                               exit(1);
+                       }
+
+                       for (i = 0; i < arg; i++)
+                               indata[i] = i & 0xff;
+
+                       EchoData(arg, indata, outdata);
+
+                       printf("echo %d\n", arg);
+
+                       for (i = 0; i < arg; i++) {
+                               if (indata[i] != outdata[i]) {
+                                       printf("data mismatch at offset %d, %d != %d\n",
+                                               i, indata[i], outdata[i]);
+                                       exit(0);
+                               }
+                       }
+
+                       argc -= 2;
+                       argv += 2;
+                       continue;
+               }
+
+               if (strcmp(argv[0], "sinkdata") == 0) {
+                       int arg, i;
+                       char *indata;
+
+                       if (argc < 2) {
+                               printf("Usage: sinkdata num\n");
+                               exit(1);
+                       }
+
+                       arg = atoi(argv[1]);
+
+                       if ((indata = malloc(arg)) == NULL) {
+                               printf("Error allocating %d bytes for input\n", arg);
+                               exit(1);
+                       }
+
+                       for (i = 0; i < arg; i++)
+                               indata[i] = i & 0xff;
+
+                       SinkData(arg, indata);
+
+                       printf("sinkdata %d\n", arg);
+                       argc -= 2;
+                       argv += 2;
+                       continue;
+               }
+
+               if (strcmp(argv[0], "sourcedata") == 0) {
+                       int arg, i;
+                       unsigned char *outdata;
+
+                       if (argc < 2) {
+                               printf("Usage: sourcedata num\n");
+                               exit(1);
+                       }
+
+                       arg = atoi(argv[1]);
+
+                       if ((outdata = malloc(arg)) == NULL) {
+                               printf("Error allocating %d bytes for output\n", arg);
+                               exit(1);
+                       }
+
+                       SourceData(arg, outdata);
+
+                       printf("sourcedata %d\n", arg);
+
+                       for (i = 0; i < arg; i++) {
+                               if (outdata[i] != (i & 0xff)) {
+                                       printf("data mismatch at offset %d, %d != %d\n",
+                                               i, outdata[i], i & 0xff);
+                               }
+                       }
+
+                       argc -= 2;
+                       argv += 2;
+                       continue;
+               }
+
+               if (strcmp(argv[0], "test") == 0) {
+                       printf("no TestCall\n");
+
+                       argc -= 1;
+                       argv += 1;
+                       continue;
+               }
+
+               if (strcmp(argv[0], "sleep") == 0) {
+                       long arg, result;
+
+                       if (argc < 2) {
+                               printf("Usage: sleep num\n");
+                               exit(1);
+                       }
+
+                       arg = atoi(argv[1]);
+
+//                     result = TestSleep(arg);
+//                     printf("Slept for %d seconds\n", result);
+                       printf("Sleep disabled (need async code)\n");
+
+                       argc -= 2;
+                       argv += 2;
+                       continue;
+               }
+
+               printf("Invalid command '%s'\n", argv[0]);
+               goto done;
+
+       } RpcExcept(1) {
+               unsigned long ex;
+
+               ex = RpcExceptionCode();
+               printf("Runtime error 0x%x\n", ex);
+       } RpcEndExcept
+                 }
+
+done:
+
+       status = RpcStringFree(&binding);
+
+       if (status) {
+               printf("RpcStringFree returned %d\n", status);
+               exit(status);
+       }
+
+       status = RpcBindingFree(&rpcecho_IfHandle);
+
+       if (status) {
+               printf("RpcBindingFree returned %d\n", status);
+               exit(status);
+       }
+
+       exit(0);
+}
diff --git a/testprogs/win32/rpcecho-win32-pipe/client.c.bak b/testprogs/win32/rpcecho-win32-pipe/client.c.bak
new file mode 100755 (executable)
index 0000000..b9a2e7d
--- /dev/null
@@ -0,0 +1,383 @@
+/*
+   RPC echo client.
+
+   Copyright (C) Tim Potter 2003
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include "rpcecho.h"
+#include <NtDsApi.h>
+
+void main(int argc, char **argv)
+{
+       RPC_STATUS status;
+       DWORD dwStatus;
+       char *binding = NULL;
+       const char *username=NULL;
+       const char *password=NULL;
+       const char *domain=NULL;
+#define SERVER_PRINC_LEN 1024
+       unsigned server_princ_len = SERVER_PRINC_LEN;
+       char server_princ[SERVER_PRINC_LEN];
+       unsigned sec_options = RPC_C_AUTHN_LEVEL_DEFAULT;
+       unsigned sec_proto = RPC_C_AUTHN_DEFAULT;
+
+       argv += 1;
+       argc -= 1;
+
+       while (argc > 2 && argv[0][0] == '-') {
+               const char *option;
+
+               switch (argv[0][1]) {
+               case 'e':
+                       binding = argv[1];
+                       break;
+               case 'u':
+                       username = argv[1];
+                       break;
+               case 'p':
+                       password = argv[1];
+                       break;
+               case 'd':
+                       domain = argv[1];
+                       break;
+               case '-':
+                       option = &argv[0][2];
+                       if (strcmp(option, "connect") == 0) {
+                               if (sec_options != RPC_C_AUTHN_LEVEL_DEFAULT) {
+                                       printf("You must choose connect, sign or seal, not more than one\n");
+                                       exit(1);
+                               }
+                               sec_options = RPC_C_AUTHN_LEVEL_CONNECT;
+                       } else if (strcmp(option, "sign") == 0) {
+                               if (sec_options != RPC_C_AUTHN_LEVEL_DEFAULT) {
+                                       printf("You must choose connect, sign or seal, not more than one\n");
+                                       exit(1);
+                               }
+                               sec_options = RPC_C_AUTHN_LEVEL_PKT_INTEGRITY;
+                       } else if (strcmp(option, "seal") == 0) {
+                               if (sec_options != RPC_C_AUTHN_LEVEL_DEFAULT) {
+                                       printf("You must choose connect, sign or seal, not more than one\n");
+                                       exit(1);
+                               }
+                               sec_options = RPC_C_AUTHN_LEVEL_PKT_PRIVACY;
+                       } else if (strcmp(option, "spnego") == 0) {
+                               if (sec_proto != RPC_C_AUTHN_DEFAULT) {
+                                       printf("You must choose spnego,ntlmssp or krb5, not more than one\n");
+                                       exit(1);
+                               }
+#ifdef RPC_C_AUTHN_GSS_NEGOTIATE
+                               sec_proto = RPC_C_AUTHN_GSS_NEGOTIATE;
+#else
+                               printf("Sorry --spnego RPC_C_AUTHN_GSS_NEGOTIATE is not compiled in\n");
+                               exit(1);
+#endif
+                       } else if (strcmp(option, "ntlmssp") == 0) {
+                               if (sec_proto != RPC_C_AUTHN_DEFAULT) {
+                                       printf("You must choose spnego,ntlmssp or krb5, not more than one\n");
+                                       exit(1);
+                               }
+                               sec_proto = RPC_C_AUTHN_WINNT;
+                       } else if (strcmp(option, "krb5") == 0) {
+                               if (sec_proto != RPC_C_AUTHN_DEFAULT) {
+                                       printf("You must choose spnego,ntlmssp or krb5, not more than one\n");
+                                       exit(1);
+                               }
+#ifdef RPC_C_AUTHN_GSS_KERBEROS
+                               sec_proto = RPC_C_AUTHN_GSS_KERBEROS;
+#else
+                               printf("Sorry --krb5 RPC_C_AUTHN_GSS_KERBEROS is not compiled in\n");
+                               exit(1);
+#endif
+                       } else {
+                               printf("Bad security option '%s'\n", option);
+                               exit(1);
+                       }
+                       argv++;
+                       argc--;
+                       continue;
+               default:
+                       printf("Bad option -%c\n", argv[0][0]);
+                       exit(1);
+               }
+               argv += 2;
+               argc -= 2;
+       }
+
+       if (argc < 2) {
+               printf("Usage: client [options] hostname cmd [args]\n\n");
+               printf("Where hostname is the name of the host to connect to,\n");
+               printf("and cmd is the command to execute with optional args:\n\n");
+               printf("\taddone num\tAdd one to num and return the result\n");
+               printf("\techodata size\tSend an array of size bytes and receive it back\n");
+               printf("\tsinkdata size\tSend an array of size bytes\n");
+               printf("\tsourcedata size\tReceive an array of size bytes\n");
+               printf("\ttest\trun testcall\n");
+               printf("\noptions:\n");
+               printf("\t-u username -d domain -p password -e endpoint\n");
+               printf("\t--connect --sign --seal\n");
+               printf("\t--spnego --ntlmssp --krb5\n");
+               printf("\nExamples:\n");
+               printf("\tclient HOSTNAME addone 3\n");
+               printf("\tclient 192.168.115.1 addone 3\n");
+               printf("\tclient -e ncacn_np:HOSTNAME[\\\\pipe\\\\rpcecho] addone 3\n");
+               printf("\tclient -e ncacn_ip_tcp:192.168.115.1 addone 3\n");
+               printf("\tclient -e ncacn_ip_tcp:192.168.115.1 -u tridge -d MYDOMAIN -p PASSWORD addone 3\n");
+               exit(0);
+       }
+
+
+       if (!binding) {
+               char *network_address = argv[0];
+
+               argc--;
+               argv++;
+
+               status = RpcStringBindingCompose(
+                       NULL, /* uuid */
+                       "ncacn_np",
+                       network_address,
+                       "\\pipe\\rpcecho",
+                       NULL, /* options */
+                       &binding);
+
+               if (status) {
+                       printf("RpcStringBindingCompose returned %d\n", status);
+                       exit(status);
+               }
+       }
+
+       printf("Endpoint is %s\n", binding);
+
+       status = RpcBindingFromStringBinding(
+                       binding,
+                       &rpcecho_IfHandle);
+
+       if (status) {
+               printf("RpcBindingFromStringBinding returned %d\n", status);
+               exit(status);
+       }
+
+       if (username) {
+               SEC_WINNT_AUTH_IDENTITY ident = { username, strlen(username),
+                                                 domain, strlen(domain),
+                                                 password, strlen(password),
+                                                 SEC_WINNT_AUTH_IDENTITY_ANSI };
+
+               dwStatus = DsMakeSpn("ldap",
+                                    "w2k3-101.w2k3.vmnet1.vm.base",
+                                    NULL,
+                                    0,
+                                    NULL,
+                                    &server_princ_len,
+                                    server_princ);
+
+               status = RpcBindingSetAuthInfo(rpcecho_IfHandle,
+                                              server_princ,
+                                              sec_options,
+                                              sec_proto,
+                                              &ident, 0);
+               if (status) {
+                       printf ("RpcBindingSetAuthInfo failed: 0x%x\n", status);
+                       exit (1);
+               }
+       }
+
+
+       while (argc > 0) {
+       RpcTryExcept {
+
+               /* Add one to a number */
+
+               if (strcmp(argv[0], "addone") == 0) {
+                       int arg, result;
+
+                       if (argc < 2) {
+                               printf("Usage: addone num\n");
+                               exit(1);
+                       }
+
+                       arg = atoi(argv[1]);
+
+                       AddOne(0,0, &result);
+                       printf("%d + 1 = %d\n", arg, result);
+
+                       argc -= 2;
+                       argv += 2;
+                       continue;
+               }
+
+               /* Echo an array */
+
+               if (strcmp(argv[0], "echodata") == 0) {
+                       int arg, i;
+                       char *indata, *outdata;
+
+                       if (argc < 2) {
+                               printf("Usage: echo num\n");
+                               exit(1);
+                       }
+
+                       arg = atoi(argv[1]);
+
+                       if ((indata = malloc(arg)) == NULL) {
+                               printf("Error allocating %d bytes for input\n", arg);
+                               exit(1);
+                       }
+
+                       if ((outdata = malloc(arg)) == NULL) {
+                               printf("Error allocating %d bytes for output\n", arg);
+                               exit(1);
+                       }
+
+                       for (i = 0; i < arg; i++)
+                               indata[i] = i & 0xff;
+
+                       EchoData(arg, indata, outdata);
+
+                       printf("echo %d\n", arg);
+
+                       for (i = 0; i < arg; i++) {
+                               if (indata[i] != outdata[i]) {
+                                       printf("data mismatch at offset %d, %d != %d\n",
+                                               i, indata[i], outdata[i]);
+                                       exit(0);
+                               }
+                       }
+
+                       argc -= 2;
+                       argv += 2;
+                       continue;
+               }
+
+               if (strcmp(argv[0], "sinkdata") == 0) {
+                       int arg, i;
+                       char *indata;
+
+                       if (argc < 2) {
+                               printf("Usage: sinkdata num\n");
+                               exit(1);
+                       }
+
+                       arg = atoi(argv[1]);
+
+                       if ((indata = malloc(arg)) == NULL) {
+                               printf("Error allocating %d bytes for input\n", arg);
+                               exit(1);
+                       }
+
+                       for (i = 0; i < arg; i++)
+                               indata[i] = i & 0xff;
+
+                       SinkData(arg, indata);
+
+                       printf("sinkdata %d\n", arg);
+                       argc -= 2;
+                       argv += 2;
+                       continue;
+               }
+
+               if (strcmp(argv[0], "sourcedata") == 0) {
+                       int arg, i;
+                       unsigned char *outdata;
+
+                       if (argc < 2) {
+                               printf("Usage: sourcedata num\n");
+                               exit(1);
+                       }
+
+                       arg = atoi(argv[1]);
+
+                       if ((outdata = malloc(arg)) == NULL) {
+                               printf("Error allocating %d bytes for output\n", arg);
+                               exit(1);
+                       }
+
+                       SourceData(arg, outdata);
+
+                       printf("sourcedata %d\n", arg);
+
+                       for (i = 0; i < arg; i++) {
+                               if (outdata[i] != (i & 0xff)) {
+                                       printf("data mismatch at offset %d, %d != %d\n",
+                                               i, outdata[i], i & 0xff);
+                               }
+                       }
+
+                       argc -= 2;
+                       argv += 2;
+                       continue;
+               }
+
+               if (strcmp(argv[0], "test") == 0) {
+                       printf("no TestCall\n");
+
+                       argc -= 1;
+                       argv += 1;
+                       continue;
+               }
+
+               if (strcmp(argv[0], "sleep") == 0) {
+                       long arg, result;
+
+                       if (argc < 2) {
+                               printf("Usage: sleep num\n");
+                               exit(1);
+                       }
+
+                       arg = atoi(argv[1]);
+
+//                     result = TestSleep(arg);
+//                     printf("Slept for %d seconds\n", result);
+                       printf("Sleep disabled (need async code)\n");
+
+                       argc -= 2;
+                       argv += 2;
+                       continue;
+               }
+
+               printf("Invalid command '%s'\n", argv[0]);
+               goto done;
+
+       } RpcExcept(1) {
+               unsigned long ex;
+
+               ex = RpcExceptionCode();
+               printf("Runtime error 0x%x\n", ex);
+       } RpcEndExcept
+                 }
+
+done:
+
+       status = RpcStringFree(&binding);
+
+       if (status) {
+               printf("RpcStringFree returned %d\n", status);
+               exit(status);
+       }
+
+       status = RpcBindingFree(&rpcecho_IfHandle);
+
+       if (status) {
+               printf("RpcBindingFree returned %d\n", status);
+               exit(status);
+       }
+
+       exit(0);
+}
diff --git a/testprogs/win32/rpcecho-win32-pipe/rpcecho.acf b/testprogs/win32/rpcecho-win32-pipe/rpcecho.acf
new file mode 100755 (executable)
index 0000000..c0319ac
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+   RPC echo ACF.
+
+   Copyright (C) Tim Potter 2003
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+[
+       implicit_handle (handle_t rpcecho_IfHandle)
+]
+interface rpcecho
+{
+/*     [async] TestSleep(); */
+}
diff --git a/testprogs/win32/rpcecho-win32-pipe/rpcecho.h b/testprogs/win32/rpcecho-win32-pipe/rpcecho.h
new file mode 100755 (executable)
index 0000000..bf79767
--- /dev/null
@@ -0,0 +1,176 @@
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 6.00.0361 */
+/* at Mon Aug 03 16:54:26 2009
+ */
+/* Compiler settings for rpcecho.idl, rpcecho.acf:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 475
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+
+#ifndef __rpcecho_h__
+#define __rpcecho_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+void * __RPC_USER MIDL_user_allocate(size_t);
+void __RPC_USER MIDL_user_free( void * );
+
+#ifndef __rpcecho_INTERFACE_DEFINED__
+#define __rpcecho_INTERFACE_DEFINED__
+
+/* interface rpcecho */
+/* [implicit_handle][unique][version][uuid] */
+
+void AddOne(
+    /* [in] */ long in_data,
+    /* [in] */ long in_data2,
+    /* [out] */ int *out_data);
+
+void EchoData(
+    /* [in] */ int len,
+    /* [size_is][in] */ unsigned char in_data[  ],
+    /* [size_is][out] */ unsigned char out_data[  ]);
+
+void SinkData(
+    /* [in] */ int len,
+    /* [size_is][in] */ unsigned char in_data[  ]);
+
+void SourceData(
+    /* [in] */ int len,
+    /* [size_is][out] */ unsigned char out_data[  ]);
+
+#define        myconstant      ( 42 )
+
+void TestCall(
+    /* [string][in] */ wchar_t **s1,
+    /* [string][out] */ wchar_t **s2);
+
+typedef /* [public][public][public][public][public][public] */ struct __MIDL_rpcecho_0001
+    {
+    unsigned char v;
+    }  echo_info1;
+
+typedef /* [public][public][public] */ struct __MIDL_rpcecho_0002
+    {
+    short v;
+    }  echo_info2;
+
+typedef /* [public][public][public] */ struct __MIDL_rpcecho_0003
+    {
+    long v;
+    }  echo_info3;
+
+typedef /* [public][public][public][public][public][public] */ struct __MIDL_rpcecho_0004
+    {
+    hyper v;
+    }  echo_info4;
+
+typedef /* [public][public][public] */ struct __MIDL_rpcecho_0005
+    {
+    unsigned char v1;
+    hyper v2;
+    }  echo_info5;
+
+typedef /* [public][public][public] */ struct __MIDL_rpcecho_0006
+    {
+    unsigned char v1;
+    echo_info1 info1;
+    }  echo_info6;
+
+typedef /* [public][public][public] */ struct __MIDL_rpcecho_0007
+    {
+    unsigned char v1;
+    echo_info4 info4;
+    }  echo_info7;
+
+typedef /* [public][public] */ /* [switch_type] */ union __MIDL_rpcecho_0008
+    {
+    /* [case()] */ echo_info1 info1;
+    /* [case()] */ echo_info2 info2;
+    /* [case()] */ echo_info3 info3;
+    /* [case()] */ echo_info4 info4;
+    /* [case()] */ echo_info5 info5;
+    /* [case()] */ echo_info6 info6;
+    /* [case()] */ echo_info7 info7;
+    }  echo_Info;
+
+long TestCall2(
+    /* [in] */ short level,
+    /* [switch_is][out] */ echo_Info **info);
+
+long TestSleep(
+    /* [in] */ long seconds);
+
+typedef struct pipe_BYTE_PIPE
+    {
+    void (__RPC_USER * pull) (
+        char * state,
+        byte * buf,
+        unsigned long esize,
+        unsigned long * ecount );
+    void (__RPC_USER * push) (
+        char * state,
+        byte * buf,
+        unsigned long ecount );
+    void (__RPC_USER * alloc) (
+        char * state,
+        unsigned long bsize,
+        byte * * buf,
+        unsigned long * bcount );
+    char * state;
+    }  BYTE_PIPE;
+
+long TestPipe(
+    /* [in] */ long count,
+    /* [out] */ BYTE_PIPE __MIDL_0000);
+
+
+extern handle_t rpcecho_IfHandle;
+
+
+extern RPC_IF_HANDLE rpcecho_v4_0_c_ifspec;
+extern RPC_IF_HANDLE rpcecho_v4_0_s_ifspec;
+#endif /* __rpcecho_INTERFACE_DEFINED__ */
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/testprogs/win32/rpcecho-win32-pipe/rpcecho.idl b/testprogs/win32/rpcecho-win32-pipe/rpcecho.idl
new file mode 100755 (executable)
index 0000000..14c07ea
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+   RPC echo IDL.
+
+   Copyright (C) Tim Potter 2003
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+[
+/*uuid(60a15ec5-4de8-11d7-a637-005056a20182),
+version(1.0)*/
+  uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"),
+  version(4.0),
+  pointer_default(unique)
+]
+interface rpcecho
+{
+#define unistr [string] wchar_t *
+#define uint8 char
+#define uint16 short
+#define uint32 long
+#define HYPER_T hyper
+       // Add one to an integer
+       void AddOne(
+               [in] uint32 in_data,
+               [in] uint32 in_data2,
+               [out] int *out_data
+       );
+       // Echo an array of bytes back at the caller
+       void EchoData(
+               [in] int len,
+               [in] [size_is(len)] char in_data[],
+               [out] [size_is(len)] char out_data[]
+       );
+       // Sink data to the server
+       void SinkData(
+               [in] int len,
+               [in] [size_is(len)] char in_data[]
+       );
+       // Source data from server
+       void SourceData(
+               [in] int len,
+               [out] [size_is(len)] char out_data[]
+       );
+
+       const long myconstant = 42;
+
+       /* test strings */
+       void TestCall (
+               [in]   unistr *s1,
+               [out]  unistr *s2
+               );
+
+
+       /* test some alignment issues */
+       typedef struct {
+               uint8 v;
+       } echo_info1;
+
+       typedef struct {
+               uint16 v;
+       } echo_info2;
+
+       typedef struct {
+               uint32 v;
+       } echo_info3;
+
+       typedef struct {
+               HYPER_T v;
+       } echo_info4;
+
+       typedef struct {
+               uint8 v1;
+               HYPER_T v2;
+       } echo_info5;
+
+       typedef struct {
+               uint8 v1;
+               echo_info1 info1;
+       } echo_info6;
+
+       typedef struct {
+               uint8 v1;
+               echo_info4 info4;
+       } echo_info7;
+
+       typedef union {
+               [case(1)]  echo_info1 info1;
+               [case(2)]  echo_info2 info2;
+               [case(3)]  echo_info3 info3;
+               [case(4)]  echo_info4 info4;
+               [case(5)]  echo_info5 info5;
+               [case(6)]  echo_info6 info6;
+               [case(7)]  echo_info7 info7;
+       } echo_Info;
+
+       long TestCall2 (
+               [in]                     uint16 level,
+               [out,switch_is(level)]   echo_Info **info
+               );
+
+       long TestSleep(
+               [in] long seconds
+               );
+
+       typedef pipe byte BYTE_PIPE;
+
+       long TestPipe(
+               [in] long count,
+               [out] BYTE_PIPE
+               );
+
+/*
+       typedef enum {
+               ECHO_ENUM1 = 1,
+               ECHO_ENUM2 = 2
+       } echo_Enum1;
+
+       typedef [v1_enum] enum {
+               ECHO_ENUM1_32 = 1,
+               ECHO_ENUM2_32 = 2
+       } echo_Enum1_32;
+
+       typedef struct {
+               echo_Enum1 e1;
+               echo_Enum1_32 e2;
+       } echo_Enum2;
+
+       typedef union {
+               [case(ECHO_ENUM1)] echo_Enum1 e1;
+               [case(ECHO_ENUM2)] echo_Enum2 e2;
+       } echo_Enum3;
+
+       void echo_TestEnum(
+               [in,out,ref] echo_Enum1 *foo1,
+               [in,out,ref] echo_Enum2 *foo2,
+               [in,out,ref,switch_is(*foo1)] echo_Enum3 *foo3
+               );
+
+       typedef struct {
+               uint32 x;
+               [size_is(x)] uint16 surrounding[*];
+       } echo_Surrounding;
+
+       void echo_TestSurrounding(
+               [in,out,ref] echo_Surrounding *data
+       );
+
+       uint16 echo_TestDoublePointer([in,ref] uint16 ***data);
+*/
+}
diff --git a/testprogs/win32/rpcecho-win32-pipe/rpcecho.idl.bak b/testprogs/win32/rpcecho-win32-pipe/rpcecho.idl.bak
new file mode 100755 (executable)
index 0000000..d76d166
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+   RPC echo IDL.
+
+   Copyright (C) Tim Potter 2003
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+[
+/*uuid(60a15ec5-4de8-11d7-a637-005056a20182),
+version(1.0)*/
+  uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"),
+  version(4.0),
+  pointer_default(unique)
+]
+interface rpcecho
+{
+#define unistr [string] wchar_t *
+#define uint8 char
+#define uint16 short
+#define uint32 long
+#define HYPER_T hyper
+       // Add one to an integer
+       void AddOne(
+               [in] uint32 *in_data,
+               [in] uint32 *in_data2,
+               [out] int *out_data
+       );
+       // Echo an array of bytes back at the caller
+       void EchoData(
+               [in] int len,
+               [in] [size_is(len)] char in_data[],
+               [out] [size_is(len)] char out_data[]
+       );
+       // Sink data to the server
+       void SinkData(
+               [in] int len,
+               [in] [size_is(len)] char in_data[]
+       );
+       // Source data from server
+       void SourceData(
+               [in] int len,
+               [out] [size_is(len)] char out_data[]
+       );
+
+       const long myconstant = 42;
+
+       /* test strings */
+       void TestCall (
+               [in]   unistr *s1,
+               [out]  unistr *s2
+               );
+
+
+       /* test some alignment issues */
+       typedef struct {
+               uint8 v;
+       } echo_info1;
+
+       typedef struct {
+               uint16 v;
+       } echo_info2;
+
+       typedef struct {
+               uint32 v;
+       } echo_info3;
+
+       typedef struct {
+               HYPER_T v;
+       } echo_info4;
+
+       typedef struct {
+               uint8 v1;
+               HYPER_T v2;
+       } echo_info5;
+
+       typedef struct {
+               uint8 v1;
+               echo_info1 info1;
+       } echo_info6;
+
+       typedef struct {
+               uint8 v1;
+               echo_info4 info4;
+       } echo_info7;
+
+       typedef union {
+               [case(1)]  echo_info1 info1;
+               [case(2)]  echo_info2 info2;
+               [case(3)]  echo_info3 info3;
+               [case(4)]  echo_info4 info4;
+               [case(5)]  echo_info5 info5;
+               [case(6)]  echo_info6 info6;
+               [case(7)]  echo_info7 info7;
+       } echo_Info;
+
+       long TestCall2 (
+               [in]                     uint16 level,
+               [out,switch_is(level)]   echo_Info **info
+               );
+
+       long TestSleep(
+               [in] long seconds
+               );
+/*
+       typedef enum {
+               ECHO_ENUM1 = 1,
+               ECHO_ENUM2 = 2
+       } echo_Enum1;
+
+       typedef [v1_enum] enum {
+               ECHO_ENUM1_32 = 1,
+               ECHO_ENUM2_32 = 2
+       } echo_Enum1_32;
+
+       typedef struct {
+               echo_Enum1 e1;
+               echo_Enum1_32 e2;
+       } echo_Enum2;
+
+       typedef union {
+               [case(ECHO_ENUM1)] echo_Enum1 e1;
+               [case(ECHO_ENUM2)] echo_Enum2 e2;
+       } echo_Enum3;
+
+       void echo_TestEnum(
+               [in,out,ref] echo_Enum1 *foo1,
+               [in,out,ref] echo_Enum2 *foo2,
+               [in,out,ref,switch_is(*foo1)] echo_Enum3 *foo3
+               );
+
+       typedef struct {
+               uint32 x;
+               [size_is(x)] uint16 surrounding[*];
+       } echo_Surrounding;
+
+       void echo_TestSurrounding(
+               [in,out,ref] echo_Surrounding *data
+       );
+
+       uint16 echo_TestDoublePointer([in,ref] uint16 ***data);
+*/
+}
diff --git a/testprogs/win32/rpcecho-win32-pipe/rpcecho_c.c b/testprogs/win32/rpcecho-win32-pipe/rpcecho_c.c
new file mode 100755 (executable)
index 0000000..9f104cb
--- /dev/null
@@ -0,0 +1,1314 @@
+
+
+/* this ALWAYS GENERATED file contains the RPC client stubs */
+
+
+ /* File created by MIDL compiler version 6.00.0361 */
+/* at Mon Aug 03 16:54:26 2009
+ */
+/* Compiler settings for rpcecho.idl, rpcecho.acf:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#if !defined(_M_IA64) && !defined(_M_AMD64)
+
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+#if _MSC_VER >= 1200
+#pragma warning(push)
+#endif
+#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */
+#pragma warning( disable: 4211 )  /* redefine extent to static */
+#pragma warning( disable: 4232 )  /* dllimport identity*/
+#include <string.h>
+
+#include "rpcecho.h"
+
+#define TYPE_FORMAT_STRING_SIZE   157
+#define PROC_FORMAT_STRING_SIZE   313
+#define TRANSMIT_AS_TABLE_SIZE    0
+#define WIRE_MARSHAL_TABLE_SIZE   0
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
+    } MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
+    } MIDL_PROC_FORMAT_STRING;
+
+
+static RPC_SYNTAX_IDENTIFIER  _RpcTransferSyntax =
+{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
+
+
+extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+#define GENERIC_BINDING_TABLE_SIZE   0
+
+
+/* Standard interface: rpcecho, ver. 4.0,
+   GUID={0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}} */
+
+handle_t rpcecho_IfHandle;
+
+
+static const RPC_CLIENT_INTERFACE rpcecho___RpcClientInterface =
+    {
+    sizeof(RPC_CLIENT_INTERFACE),
+    {{0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},{4,0}},
+    {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
+    0,
+    0,
+    0,
+    0,
+    0,
+    0x00000001
+    };
+RPC_IF_HANDLE rpcecho_v4_0_c_ifspec = (RPC_IF_HANDLE)& rpcecho___RpcClientInterface;
+
+extern const MIDL_STUB_DESC rpcecho_StubDesc;
+
+static RPC_BINDING_HANDLE rpcecho__MIDL_AutoBindHandle;
+
+
+void AddOne(
+    /* [in] */ long in_data,
+    /* [in] */ long in_data2,
+    /* [out] */ int *out_data)
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0],
+                  ( unsigned char * )&in_data);
+
+}
+
+
+void EchoData(
+    /* [in] */ int len,
+    /* [size_is][in] */ unsigned char in_data[  ],
+    /* [size_is][out] */ unsigned char out_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[42],
+                  ( unsigned char * )&len);
+
+}
+
+
+void SinkData(
+    /* [in] */ int len,
+    /* [size_is][in] */ unsigned char in_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[84],
+                  ( unsigned char * )&len);
+
+}
+
+
+void SourceData(
+    /* [in] */ int len,
+    /* [size_is][out] */ unsigned char out_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[120],
+                  ( unsigned char * )&len);
+
+}
+
+
+void TestCall(
+    /* [string][in] */ wchar_t **s1,
+    /* [string][out] */ wchar_t **s2)
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[156],
+                  ( unsigned char * )&s1);
+
+}
+
+
+long TestCall2(
+    /* [in] */ short level,
+    /* [switch_is][out] */ echo_Info **info)
+{
+
+    CLIENT_CALL_RETURN _RetVal;
+
+    _RetVal = NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[192],
+                  ( unsigned char * )&level);
+    return ( long  )_RetVal.Simple;
+
+}
+
+
+long TestSleep(
+    /* [in] */ long seconds)
+{
+
+    CLIENT_CALL_RETURN _RetVal;
+
+    _RetVal = NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[234],
+                  ( unsigned char * )&seconds);
+    return ( long  )_RetVal.Simple;
+
+}
+
+
+long TestPipe(
+    /* [in] */ long count,
+    /* [out] */ BYTE_PIPE __MIDL_0000)
+{
+
+    CLIENT_CALL_RETURN _RetVal;
+
+    _RetVal = NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[270],
+                  ( unsigned char * )&count);
+    return ( long  )_RetVal.Simple;
+
+}
+
+
+#if !defined(__RPC_WIN32__)
+#error  Invalid build platform for this stub.
+#endif
+
+#if !(TARGET_IS_NT50_OR_LATER)
+#error You need a Windows 2000 or later to run this stub because it uses these features:
+#error   /robust command line switch.
+#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
+#error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
+#endif
+
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+    {
+        0,
+        {
+
+       /* Procedure AddOne */
+
+                       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/*  2 */       NdrFcLong( 0x0 ),       /* 0 */
+/*  6 */       NdrFcShort( 0x0 ),      /* 0 */
+/*  8 */       NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 10 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 12 */       NdrFcShort( 0x1c ),     /* 28 */
+/* 14 */       0x40,           /* Oi2 Flags:  has ext, */
+                       0x3,            /* 3 */
+/* 16 */       0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 18 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 20 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 22 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter in_data */
+
+/* 24 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 26 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 28 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data2 */
+
+/* 30 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 32 */       NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 34 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 36 */       NdrFcShort( 0x2150 ),   /* Flags:  out, base type, simple ref, srv alloc size=8 */
+/* 38 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 40 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure EchoData */
+
+/* 42 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 44 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 48 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 50 */       NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 52 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 54 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 56 */       0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x3,            /* 3 */
+/* 58 */       0x8,            /* 8 */
+                       0x7,            /* Ext Flags:  new corr desc, clt corr check, srv corr check, */
+/* 60 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 62 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 64 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 66 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 68 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 70 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 72 */       NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 74 */       NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 76 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Parameter out_data */
+
+/* 78 */       NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 80 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 82 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SinkData */
+
+/* 84 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 86 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 90 */       NdrFcShort( 0x2 ),      /* 2 */
+/* 92 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 94 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 96 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 98 */       0x42,           /* Oi2 Flags:  clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 100 */      0x8,            /* 8 */
+                       0x5,            /* Ext Flags:  new corr desc, srv corr check, */
+/* 102 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 104 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 106 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 108 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 110 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 112 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 114 */      NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 116 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 118 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SourceData */
+
+/* 120 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 122 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 126 */      NdrFcShort( 0x3 ),      /* 3 */
+/* 128 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 130 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 132 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 134 */      0x41,           /* Oi2 Flags:  srv must size, has ext, */
+                       0x2,            /* 2 */
+/* 136 */      0x8,            /* 8 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 138 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 140 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 142 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 144 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 146 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 148 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 150 */      NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 152 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 154 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure TestCall */
+
+/* 156 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 158 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 162 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 164 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 166 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 168 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 170 */      0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 172 */      0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 174 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 176 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 178 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter s1 */
+
+/* 180 */      NdrFcShort( 0x200b ),   /* Flags:  must size, must free, in, srv alloc size=8 */
+/* 182 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 184 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Parameter s2 */
+
+/* 186 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 188 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 190 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Procedure TestCall2 */
+
+/* 192 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 194 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 198 */      NdrFcShort( 0x5 ),      /* 5 */
+/* 200 */      NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 202 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 204 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 206 */      0x45,           /* Oi2 Flags:  srv must size, has return, has ext, */
+                       0x3,            /* 3 */
+/* 208 */      0x8,            /* 8 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 210 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 212 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 214 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter level */
+
+/* 216 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 218 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 220 */      0x6,            /* FC_SHORT */
+                       0x0,            /* 0 */
+
+       /* Parameter info */
+
+/* 222 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 224 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 226 */      NdrFcShort( 0x1a ),     /* Type Offset=26 */
+
+       /* Return value */
+
+/* 228 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 230 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 232 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestSleep */
+
+/* 234 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 236 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 240 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 242 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 244 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 246 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 248 */      0x44,           /* Oi2 Flags:  has return, has ext, */
+                       0x2,            /* 2 */
+/* 250 */      0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 252 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 254 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 256 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter seconds */
+
+/* 258 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 260 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 262 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Return value */
+
+/* 264 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 266 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 268 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestPipe */
+
+/* 270 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 272 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 276 */      NdrFcShort( 0x7 ),      /* 7 */
+/* 278 */      NdrFcShort( 0x18 ),     /* x86 Stack size/offset = 24 */
+/* 280 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 282 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 284 */      0x4c,           /* Oi2 Flags:  has return, has pipes, has ext, */
+                       0x3,            /* 3 */
+/* 286 */      0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 288 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 290 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 292 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter count */
+
+/* 294 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 296 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 298 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter __MIDL_0000 */
+
+/* 300 */      NdrFcShort( 0x14 ),     /* Flags:  pipe, out, */
+/* 302 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 304 */      NdrFcShort( 0x94 ),     /* Type Offset=148 */
+
+       /* Return value */
+
+/* 306 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 308 */      NdrFcShort( 0x14 ),     /* x86 Stack size/offset = 20 */
+/* 310 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+                       0x0
+        }
+    };
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+    {
+        0,
+        {
+                       NdrFcShort( 0x0 ),      /* 0 */
+/*  2 */
+                       0x11, 0xc,      /* FC_RP [alloced_on_stack] [simple_pointer] */
+/*  4 */       0x8,            /* FC_LONG */
+                       0x5c,           /* FC_PAD */
+/*  6 */
+                       0x1b,           /* FC_CARRAY */
+                       0x0,            /* 0 */
+/*  8 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 10 */       0x28,           /* Corr desc:  parameter, FC_LONG */
+                       0x0,            /*  */
+/* 12 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 14 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 16 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 18 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 20 */       NdrFcShort( 0x2 ),      /* Offset= 2 (22) */
+/* 22 */
+                       0x12, 0x8,      /* FC_UP [simple_pointer] */
+/* 24 */
+                       0x25,           /* FC_C_WSTRING */
+                       0x5c,           /* FC_PAD */
+/* 26 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 28 */       NdrFcShort( 0x2 ),      /* Offset= 2 (30) */
+/* 30 */
+                       0x12, 0x0,      /* FC_UP */
+/* 32 */       NdrFcShort( 0x2 ),      /* Offset= 2 (34) */
+/* 34 */
+                       0x2b,           /* FC_NON_ENCAPSULATED_UNION */
+                       0x6,            /* FC_SHORT */
+/* 36 */       0x26,           /* Corr desc:  parameter, FC_SHORT */
+                       0x0,            /*  */
+/* 38 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 40 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 42 */       NdrFcShort( 0x2 ),      /* Offset= 2 (44) */
+/* 44 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 46 */       NdrFcShort( 0x7 ),      /* 7 */
+/* 48 */       NdrFcLong( 0x1 ),       /* 1 */
+/* 52 */       NdrFcShort( 0x28 ),     /* Offset= 40 (92) */
+/* 54 */       NdrFcLong( 0x2 ),       /* 2 */
+/* 58 */       NdrFcShort( 0x28 ),     /* Offset= 40 (98) */
+/* 60 */       NdrFcLong( 0x3 ),       /* 3 */
+/* 64 */       NdrFcShort( 0x28 ),     /* Offset= 40 (104) */
+/* 66 */       NdrFcLong( 0x4 ),       /* 4 */
+/* 70 */       NdrFcShort( 0x28 ),     /* Offset= 40 (110) */
+/* 72 */       NdrFcLong( 0x5 ),       /* 5 */
+/* 76 */       NdrFcShort( 0x28 ),     /* Offset= 40 (116) */
+/* 78 */       NdrFcLong( 0x6 ),       /* 6 */
+/* 82 */       NdrFcShort( 0x2a ),     /* Offset= 42 (124) */
+/* 84 */       NdrFcLong( 0x7 ),       /* 7 */
+/* 88 */       NdrFcShort( 0x2e ),     /* Offset= 46 (134) */
+/* 90 */       NdrFcShort( 0xffff ),   /* Offset= -1 (89) */
+/* 92 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 94 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 96 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 98 */
+                       0x15,           /* FC_STRUCT */
+                       0x1,            /* 1 */
+/* 100 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 102 */      0x6,            /* FC_SHORT */
+                       0x5b,           /* FC_END */
+/* 104 */
+                       0x15,           /* FC_STRUCT */
+                       0x3,            /* 3 */
+/* 106 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 108 */      0x8,            /* FC_LONG */
+                       0x5b,           /* FC_END */
+/* 110 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 112 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 114 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 116 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 118 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 120 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 122 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 124 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 126 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 128 */      0x2,            /* FC_CHAR */
+                       0x4c,           /* FC_EMBEDDED_COMPLEX */
+/* 130 */      0x0,            /* 0 */
+                       NdrFcShort( 0xffd9 ),   /* Offset= -39 (92) */
+                       0x5b,           /* FC_END */
+/* 134 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 136 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 138 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 140 */      0x4c,           /* FC_EMBEDDED_COMPLEX */
+                       0x0,            /* 0 */
+/* 142 */      NdrFcShort( 0xffe0 ),   /* Offset= -32 (110) */
+/* 144 */      0x5c,           /* FC_PAD */
+                       0x5b,           /* FC_END */
+/* 146 */      0x1,            /* FC_BYTE */
+                       0x5c,           /* FC_PAD */
+/* 148 */      0xb5,           /* FC_PIPE */
+                       0x0,            /* 0 */
+/* 150 */      NdrFcShort( 0xfffc ),   /* Offset= -4 (146) */
+/* 152 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 154 */      NdrFcShort( 0x1 ),      /* 1 */
+
+                       0x0
+        }
+    };
+
+static const unsigned short rpcecho_FormatStringOffsetTable[] =
+    {
+    0,
+    42,
+    84,
+    120,
+    156,
+    192,
+    234,
+    270
+    };
+
+
+static const MIDL_STUB_DESC rpcecho_StubDesc =
+    {
+    (void *)& rpcecho___RpcClientInterface,
+    MIDL_user_allocate,
+    MIDL_user_free,
+    &rpcecho_IfHandle,
+    0,
+    0,
+    0,
+    0,
+    __MIDL_TypeFormatString.Format,
+    1, /* -error bounds_check flag */
+    0x50002, /* Ndr library version */
+    0,
+    0x6000169, /* MIDL Version 6.0.361 */
+    0,
+    0,
+    0,  /* notify & notify_flag routine table */
+    0x1, /* MIDL flag */
+    0, /* cs routines */
+    0,   /* proxy/server info */
+    0   /* Reserved5 */
+    };
+#if _MSC_VER >= 1200
+#pragma warning(pop)
+#endif
+
+
+#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/
+
+
+
+/* this ALWAYS GENERATED file contains the RPC client stubs */
+
+
+ /* File created by MIDL compiler version 6.00.0361 */
+/* at Mon Aug 03 16:54:26 2009
+ */
+/* Compiler settings for rpcecho.idl, rpcecho.acf:
+    Oicf, W1, Zp8, env=Win64 (32b run,appending)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#if defined(_M_IA64) || defined(_M_AMD64)
+
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+#if _MSC_VER >= 1200
+#pragma warning(push)
+#endif
+
+#pragma warning( disable: 4211 )  /* redefine extent to static */
+#pragma warning( disable: 4232 )  /* dllimport identity*/
+#include <string.h>
+
+#include "rpcecho.h"
+
+#define TYPE_FORMAT_STRING_SIZE   157
+#define PROC_FORMAT_STRING_SIZE   329
+#define TRANSMIT_AS_TABLE_SIZE    0
+#define WIRE_MARSHAL_TABLE_SIZE   0
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
+    } MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
+    } MIDL_PROC_FORMAT_STRING;
+
+
+static RPC_SYNTAX_IDENTIFIER  _RpcTransferSyntax =
+{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
+
+
+extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+#define GENERIC_BINDING_TABLE_SIZE   0
+
+
+/* Standard interface: rpcecho, ver. 4.0,
+   GUID={0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}} */
+
+handle_t rpcecho_IfHandle;
+
+
+static const RPC_CLIENT_INTERFACE rpcecho___RpcClientInterface =
+    {
+    sizeof(RPC_CLIENT_INTERFACE),
+    {{0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},{4,0}},
+    {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
+    0,
+    0,
+    0,
+    0,
+    0,
+    0x00000001
+    };
+RPC_IF_HANDLE rpcecho_v4_0_c_ifspec = (RPC_IF_HANDLE)& rpcecho___RpcClientInterface;
+
+extern const MIDL_STUB_DESC rpcecho_StubDesc;
+
+static RPC_BINDING_HANDLE rpcecho__MIDL_AutoBindHandle;
+
+
+void AddOne(
+    /* [in] */ long in_data,
+    /* [in] */ long in_data2,
+    /* [out] */ int *out_data)
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0],
+                  in_data,
+                  in_data2,
+                  out_data);
+
+}
+
+
+void EchoData(
+    /* [in] */ int len,
+    /* [size_is][in] */ unsigned char in_data[  ],
+    /* [size_is][out] */ unsigned char out_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[44],
+                  len,
+                  in_data,
+                  out_data);
+
+}
+
+
+void SinkData(
+    /* [in] */ int len,
+    /* [size_is][in] */ unsigned char in_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[88],
+                  len,
+                  in_data);
+
+}
+
+
+void SourceData(
+    /* [in] */ int len,
+    /* [size_is][out] */ unsigned char out_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[126],
+                  len,
+                  out_data);
+
+}
+
+
+void TestCall(
+    /* [string][in] */ wchar_t **s1,
+    /* [string][out] */ wchar_t **s2)
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[164],
+                  s1,
+                  s2);
+
+}
+
+
+long TestCall2(
+    /* [in] */ short level,
+    /* [switch_is][out] */ echo_Info **info)
+{
+
+    CLIENT_CALL_RETURN _RetVal;
+
+    _RetVal = NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[202],
+                  level,
+                  info);
+    return ( long  )_RetVal.Simple;
+
+}
+
+
+long TestSleep(
+    /* [in] */ long seconds)
+{
+
+    CLIENT_CALL_RETURN _RetVal;
+
+    _RetVal = NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[246],
+                  seconds);
+    return ( long  )_RetVal.Simple;
+
+}
+
+
+long TestPipe(
+    /* [in] */ long count,
+    /* [out] */ BYTE_PIPE __MIDL_0000)
+{
+
+    CLIENT_CALL_RETURN _RetVal;
+
+    _RetVal = NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[284],
+                  count,
+                  __MIDL_0000);
+    return ( long  )_RetVal.Simple;
+
+}
+
+
+#if !defined(__RPC_WIN64__)
+#error  Invalid build platform for this stub.
+#endif
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+    {
+        0,
+        {
+
+       /* Procedure AddOne */
+
+                       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/*  2 */       NdrFcLong( 0x0 ),       /* 0 */
+/*  6 */       NdrFcShort( 0x0 ),      /* 0 */
+/*  8 */       NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 10 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 12 */       NdrFcShort( 0x1c ),     /* 28 */
+/* 14 */       0x40,           /* Oi2 Flags:  has ext, */
+                       0x3,            /* 3 */
+/* 16 */       0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 18 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 20 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 22 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 24 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter in_data */
+
+/* 26 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 28 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 30 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data2 */
+
+/* 32 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 34 */       NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 36 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 38 */       NdrFcShort( 0x2150 ),   /* Flags:  out, base type, simple ref, srv alloc size=8 */
+/* 40 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 42 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure EchoData */
+
+/* 44 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 46 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 50 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 52 */       NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 54 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 56 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 58 */       0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x3,            /* 3 */
+/* 60 */       0xa,            /* 10 */
+                       0x7,            /* Ext Flags:  new corr desc, clt corr check, srv corr check, */
+/* 62 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 64 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 66 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 68 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 70 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 72 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 74 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 76 */       NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 78 */       NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 80 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Parameter out_data */
+
+/* 82 */       NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 84 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 86 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SinkData */
+
+/* 88 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 90 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 94 */       NdrFcShort( 0x2 ),      /* 2 */
+/* 96 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 98 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 100 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 102 */      0x42,           /* Oi2 Flags:  clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 104 */      0xa,            /* 10 */
+                       0x5,            /* Ext Flags:  new corr desc, srv corr check, */
+/* 106 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 108 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 110 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 112 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 114 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 116 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 118 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 120 */      NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 122 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 124 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SourceData */
+
+/* 126 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 128 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 132 */      NdrFcShort( 0x3 ),      /* 3 */
+/* 134 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 136 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 138 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 140 */      0x41,           /* Oi2 Flags:  srv must size, has ext, */
+                       0x2,            /* 2 */
+/* 142 */      0xa,            /* 10 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 144 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 146 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 148 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 150 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 152 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 154 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 156 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 158 */      NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 160 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 162 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure TestCall */
+
+/* 164 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 166 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 170 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 172 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 174 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 176 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 178 */      0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 180 */      0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 182 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 184 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 186 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 188 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter s1 */
+
+/* 190 */      NdrFcShort( 0x200b ),   /* Flags:  must size, must free, in, srv alloc size=8 */
+/* 192 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 194 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Parameter s2 */
+
+/* 196 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 198 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 200 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Procedure TestCall2 */
+
+/* 202 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 204 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 208 */      NdrFcShort( 0x5 ),      /* 5 */
+/* 210 */      NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 212 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 214 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 216 */      0x45,           /* Oi2 Flags:  srv must size, has return, has ext, */
+                       0x3,            /* 3 */
+/* 218 */      0xa,            /* 10 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 220 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 222 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 224 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 226 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter level */
+
+/* 228 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 230 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 232 */      0x6,            /* FC_SHORT */
+                       0x0,            /* 0 */
+
+       /* Parameter info */
+
+/* 234 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 236 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 238 */      NdrFcShort( 0x1a ),     /* Type Offset=26 */
+
+       /* Return value */
+
+/* 240 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 242 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 244 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestSleep */
+
+/* 246 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 248 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 252 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 254 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 256 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 258 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 260 */      0x44,           /* Oi2 Flags:  has return, has ext, */
+                       0x2,            /* 2 */
+/* 262 */      0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 264 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 266 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 268 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 270 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter seconds */
+
+/* 272 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 274 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 276 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Return value */
+
+/* 278 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 280 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 282 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestPipe */
+
+/* 284 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 286 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 290 */      NdrFcShort( 0x7 ),      /* 7 */
+/* 292 */      NdrFcShort( 0x30 ),     /* ia64 Stack size/offset = 48 */
+/* 294 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 296 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 298 */      0x4c,           /* Oi2 Flags:  has return, has pipes, has ext, */
+                       0x3,            /* 3 */
+/* 300 */      0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 302 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 304 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 306 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 308 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter count */
+
+/* 310 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 312 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 314 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter __MIDL_0000 */
+
+/* 316 */      NdrFcShort( 0x14 ),     /* Flags:  pipe, out, */
+/* 318 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 320 */      NdrFcShort( 0x94 ),     /* Type Offset=148 */
+
+       /* Return value */
+
+/* 322 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 324 */      NdrFcShort( 0x28 ),     /* ia64 Stack size/offset = 40 */
+/* 326 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+                       0x0
+        }
+    };
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+    {
+        0,
+        {
+                       NdrFcShort( 0x0 ),      /* 0 */
+/*  2 */
+                       0x11, 0xc,      /* FC_RP [alloced_on_stack] [simple_pointer] */
+/*  4 */       0x8,            /* FC_LONG */
+                       0x5c,           /* FC_PAD */
+/*  6 */
+                       0x1b,           /* FC_CARRAY */
+                       0x0,            /* 0 */
+/*  8 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 10 */       0x28,           /* Corr desc:  parameter, FC_LONG */
+                       0x0,            /*  */
+/* 12 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 14 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 16 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 18 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 20 */       NdrFcShort( 0x2 ),      /* Offset= 2 (22) */
+/* 22 */
+                       0x12, 0x8,      /* FC_UP [simple_pointer] */
+/* 24 */
+                       0x25,           /* FC_C_WSTRING */
+                       0x5c,           /* FC_PAD */
+/* 26 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 28 */       NdrFcShort( 0x2 ),      /* Offset= 2 (30) */
+/* 30 */
+                       0x12, 0x0,      /* FC_UP */
+/* 32 */       NdrFcShort( 0x2 ),      /* Offset= 2 (34) */
+/* 34 */
+                       0x2b,           /* FC_NON_ENCAPSULATED_UNION */
+                       0x6,            /* FC_SHORT */
+/* 36 */       0x26,           /* Corr desc:  parameter, FC_SHORT */
+                       0x0,            /*  */
+/* 38 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 40 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 42 */       NdrFcShort( 0x2 ),      /* Offset= 2 (44) */
+/* 44 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 46 */       NdrFcShort( 0x7 ),      /* 7 */
+/* 48 */       NdrFcLong( 0x1 ),       /* 1 */
+/* 52 */       NdrFcShort( 0x28 ),     /* Offset= 40 (92) */
+/* 54 */       NdrFcLong( 0x2 ),       /* 2 */
+/* 58 */       NdrFcShort( 0x28 ),     /* Offset= 40 (98) */
+/* 60 */       NdrFcLong( 0x3 ),       /* 3 */
+/* 64 */       NdrFcShort( 0x28 ),     /* Offset= 40 (104) */
+/* 66 */       NdrFcLong( 0x4 ),       /* 4 */
+/* 70 */       NdrFcShort( 0x28 ),     /* Offset= 40 (110) */
+/* 72 */       NdrFcLong( 0x5 ),       /* 5 */
+/* 76 */       NdrFcShort( 0x28 ),     /* Offset= 40 (116) */
+/* 78 */       NdrFcLong( 0x6 ),       /* 6 */
+/* 82 */       NdrFcShort( 0x2a ),     /* Offset= 42 (124) */
+/* 84 */       NdrFcLong( 0x7 ),       /* 7 */
+/* 88 */       NdrFcShort( 0x2e ),     /* Offset= 46 (134) */
+/* 90 */       NdrFcShort( 0xffff ),   /* Offset= -1 (89) */
+/* 92 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 94 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 96 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 98 */
+                       0x15,           /* FC_STRUCT */
+                       0x1,            /* 1 */
+/* 100 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 102 */      0x6,            /* FC_SHORT */
+                       0x5b,           /* FC_END */
+/* 104 */
+                       0x15,           /* FC_STRUCT */
+                       0x3,            /* 3 */
+/* 106 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 108 */      0x8,            /* FC_LONG */
+                       0x5b,           /* FC_END */
+/* 110 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 112 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 114 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 116 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 118 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 120 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 122 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 124 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 126 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 128 */      0x2,            /* FC_CHAR */
+                       0x4c,           /* FC_EMBEDDED_COMPLEX */
+/* 130 */      0x0,            /* 0 */
+                       NdrFcShort( 0xffd9 ),   /* Offset= -39 (92) */
+                       0x5b,           /* FC_END */
+/* 134 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 136 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 138 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 140 */      0x4c,           /* FC_EMBEDDED_COMPLEX */
+                       0x0,            /* 0 */
+/* 142 */      NdrFcShort( 0xffe0 ),   /* Offset= -32 (110) */
+/* 144 */      0x5c,           /* FC_PAD */
+                       0x5b,           /* FC_END */
+/* 146 */      0x1,            /* FC_BYTE */
+                       0x5c,           /* FC_PAD */
+/* 148 */      0xb5,           /* FC_PIPE */
+                       0x0,            /* 0 */
+/* 150 */      NdrFcShort( 0xfffc ),   /* Offset= -4 (146) */
+/* 152 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 154 */      NdrFcShort( 0x1 ),      /* 1 */
+
+                       0x0
+        }
+    };
+
+static const unsigned short rpcecho_FormatStringOffsetTable[] =
+    {
+    0,
+    44,
+    88,
+    126,
+    164,
+    202,
+    246,
+    284
+    };
+
+
+static const MIDL_STUB_DESC rpcecho_StubDesc =
+    {
+    (void *)& rpcecho___RpcClientInterface,
+    MIDL_user_allocate,
+    MIDL_user_free,
+    &rpcecho_IfHandle,
+    0,
+    0,
+    0,
+    0,
+    __MIDL_TypeFormatString.Format,
+    1, /* -error bounds_check flag */
+    0x50002, /* Ndr library version */
+    0,
+    0x6000169, /* MIDL Version 6.0.361 */
+    0,
+    0,
+    0,  /* notify & notify_flag routine table */
+    0x1, /* MIDL flag */
+    0, /* cs routines */
+    0,   /* proxy/server info */
+    0   /* Reserved5 */
+    };
+#if _MSC_VER >= 1200
+#pragma warning(pop)
+#endif
+
+
+#endif /* defined(_M_IA64) || defined(_M_AMD64)*/
diff --git a/testprogs/win32/rpcecho-win32-pipe/rpcecho_c.c.bak b/testprogs/win32/rpcecho-win32-pipe/rpcecho_c.c.bak
new file mode 100755 (executable)
index 0000000..1d2c9b9
--- /dev/null
@@ -0,0 +1,1190 @@
+
+
+/* this ALWAYS GENERATED file contains the RPC client stubs */
+
+
+ /* File created by MIDL compiler version 6.00.0361 */
+/* at Fri Mar 04 15:19:13 2005
+ */
+/* Compiler settings for rpcecho.idl, rpcecho.acf:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#if !defined(_M_IA64) && !defined(_M_AMD64)
+
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+#if _MSC_VER >= 1200
+#pragma warning(push)
+#endif
+#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */
+#pragma warning( disable: 4211 )  /* redefine extent to static */
+#pragma warning( disable: 4232 )  /* dllimport identity*/
+#include <string.h>
+
+#include "rpcecho.h"
+
+#define TYPE_FORMAT_STRING_SIZE   147
+#define PROC_FORMAT_STRING_SIZE   271
+#define TRANSMIT_AS_TABLE_SIZE    0
+#define WIRE_MARSHAL_TABLE_SIZE   0
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
+    } MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
+    } MIDL_PROC_FORMAT_STRING;
+
+
+static RPC_SYNTAX_IDENTIFIER  _RpcTransferSyntax =
+{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
+
+
+extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+#define GENERIC_BINDING_TABLE_SIZE   0
+
+
+/* Standard interface: rpcecho, ver. 4.0,
+   GUID={0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}} */
+
+handle_t rpcecho_IfHandle;
+
+
+static const RPC_CLIENT_INTERFACE rpcecho___RpcClientInterface =
+    {
+    sizeof(RPC_CLIENT_INTERFACE),
+    {{0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},{4,0}},
+    {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
+    0,
+    0,
+    0,
+    0,
+    0,
+    0x00000000
+    };
+RPC_IF_HANDLE rpcecho_v4_0_c_ifspec = (RPC_IF_HANDLE)& rpcecho___RpcClientInterface;
+
+extern const MIDL_STUB_DESC rpcecho_StubDesc;
+
+static RPC_BINDING_HANDLE rpcecho__MIDL_AutoBindHandle;
+
+
+void AddOne(
+    /* [in] */ long in_data,
+    /* [in] */ long in_data2,
+    /* [out] */ int *out_data)
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0],
+                  ( unsigned char * )&in_data);
+
+}
+
+
+void EchoData(
+    /* [in] */ int len,
+    /* [size_is][in] */ unsigned char in_data[  ],
+    /* [size_is][out] */ unsigned char out_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[42],
+                  ( unsigned char * )&len);
+
+}
+
+
+void SinkData(
+    /* [in] */ int len,
+    /* [size_is][in] */ unsigned char in_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[84],
+                  ( unsigned char * )&len);
+
+}
+
+
+void SourceData(
+    /* [in] */ int len,
+    /* [size_is][out] */ unsigned char out_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[120],
+                  ( unsigned char * )&len);
+
+}
+
+
+void TestCall(
+    /* [string][in] */ wchar_t **s1,
+    /* [string][out] */ wchar_t **s2)
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[156],
+                  ( unsigned char * )&s1);
+
+}
+
+
+long TestCall2(
+    /* [in] */ short level,
+    /* [switch_is][out] */ echo_Info **info)
+{
+
+    CLIENT_CALL_RETURN _RetVal;
+
+    _RetVal = NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[192],
+                  ( unsigned char * )&level);
+    return ( long  )_RetVal.Simple;
+
+}
+
+
+long TestSleep(
+    /* [in] */ long seconds)
+{
+
+    CLIENT_CALL_RETURN _RetVal;
+
+    _RetVal = NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[234],
+                  ( unsigned char * )&seconds);
+    return ( long  )_RetVal.Simple;
+
+}
+
+
+#if !defined(__RPC_WIN32__)
+#error  Invalid build platform for this stub.
+#endif
+
+#if !(TARGET_IS_NT50_OR_LATER)
+#error You need a Windows 2000 or later to run this stub because it uses these features:
+#error   /robust command line switch.
+#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
+#error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
+#endif
+
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+    {
+        0,
+        {
+
+       /* Procedure AddOne */
+
+                       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/*  2 */       NdrFcLong( 0x0 ),       /* 0 */
+/*  6 */       NdrFcShort( 0x0 ),      /* 0 */
+/*  8 */       NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 10 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 12 */       NdrFcShort( 0x1c ),     /* 28 */
+/* 14 */       0x40,           /* Oi2 Flags:  has ext, */
+                       0x3,            /* 3 */
+/* 16 */       0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 18 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 20 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 22 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter in_data */
+
+/* 24 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 26 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 28 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data2 */
+
+/* 30 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 32 */       NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 34 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 36 */       NdrFcShort( 0x2150 ),   /* Flags:  out, base type, simple ref, srv alloc size=8 */
+/* 38 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 40 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure EchoData */
+
+/* 42 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 44 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 48 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 50 */       NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 52 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 54 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 56 */       0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x3,            /* 3 */
+/* 58 */       0x8,            /* 8 */
+                       0x7,            /* Ext Flags:  new corr desc, clt corr check, srv corr check, */
+/* 60 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 62 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 64 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 66 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 68 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 70 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 72 */       NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 74 */       NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 76 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Parameter out_data */
+
+/* 78 */       NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 80 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 82 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SinkData */
+
+/* 84 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 86 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 90 */       NdrFcShort( 0x2 ),      /* 2 */
+/* 92 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 94 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 96 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 98 */       0x42,           /* Oi2 Flags:  clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 100 */      0x8,            /* 8 */
+                       0x5,            /* Ext Flags:  new corr desc, srv corr check, */
+/* 102 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 104 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 106 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 108 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 110 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 112 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 114 */      NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 116 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 118 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SourceData */
+
+/* 120 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 122 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 126 */      NdrFcShort( 0x3 ),      /* 3 */
+/* 128 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 130 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 132 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 134 */      0x41,           /* Oi2 Flags:  srv must size, has ext, */
+                       0x2,            /* 2 */
+/* 136 */      0x8,            /* 8 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 138 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 140 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 142 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 144 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 146 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 148 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 150 */      NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 152 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 154 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure TestCall */
+
+/* 156 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 158 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 162 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 164 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 166 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 168 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 170 */      0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 172 */      0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 174 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 176 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 178 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter s1 */
+
+/* 180 */      NdrFcShort( 0x200b ),   /* Flags:  must size, must free, in, srv alloc size=8 */
+/* 182 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 184 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Parameter s2 */
+
+/* 186 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 188 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 190 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Procedure TestCall2 */
+
+/* 192 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 194 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 198 */      NdrFcShort( 0x5 ),      /* 5 */
+/* 200 */      NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 202 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 204 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 206 */      0x45,           /* Oi2 Flags:  srv must size, has return, has ext, */
+                       0x3,            /* 3 */
+/* 208 */      0x8,            /* 8 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 210 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 212 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 214 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter level */
+
+/* 216 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 218 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 220 */      0x6,            /* FC_SHORT */
+                       0x0,            /* 0 */
+
+       /* Parameter info */
+
+/* 222 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 224 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 226 */      NdrFcShort( 0x1a ),     /* Type Offset=26 */
+
+       /* Return value */
+
+/* 228 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 230 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 232 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestSleep */
+
+/* 234 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 236 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 240 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 242 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 244 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 246 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 248 */      0x44,           /* Oi2 Flags:  has return, has ext, */
+                       0x2,            /* 2 */
+/* 250 */      0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 252 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 254 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 256 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter seconds */
+
+/* 258 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 260 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 262 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Return value */
+
+/* 264 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 266 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 268 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+                       0x0
+        }
+    };
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+    {
+        0,
+        {
+                       NdrFcShort( 0x0 ),      /* 0 */
+/*  2 */
+                       0x11, 0xc,      /* FC_RP [alloced_on_stack] [simple_pointer] */
+/*  4 */       0x8,            /* FC_LONG */
+                       0x5c,           /* FC_PAD */
+/*  6 */
+                       0x1b,           /* FC_CARRAY */
+                       0x0,            /* 0 */
+/*  8 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 10 */       0x28,           /* Corr desc:  parameter, FC_LONG */
+                       0x0,            /*  */
+/* 12 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 14 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 16 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 18 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 20 */       NdrFcShort( 0x2 ),      /* Offset= 2 (22) */
+/* 22 */
+                       0x12, 0x8,      /* FC_UP [simple_pointer] */
+/* 24 */
+                       0x25,           /* FC_C_WSTRING */
+                       0x5c,           /* FC_PAD */
+/* 26 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 28 */       NdrFcShort( 0x2 ),      /* Offset= 2 (30) */
+/* 30 */
+                       0x12, 0x0,      /* FC_UP */
+/* 32 */       NdrFcShort( 0x2 ),      /* Offset= 2 (34) */
+/* 34 */
+                       0x2b,           /* FC_NON_ENCAPSULATED_UNION */
+                       0x6,            /* FC_SHORT */
+/* 36 */       0x26,           /* Corr desc:  parameter, FC_SHORT */
+                       0x0,            /*  */
+/* 38 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 40 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 42 */       NdrFcShort( 0x2 ),      /* Offset= 2 (44) */
+/* 44 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 46 */       NdrFcShort( 0x7 ),      /* 7 */
+/* 48 */       NdrFcLong( 0x1 ),       /* 1 */
+/* 52 */       NdrFcShort( 0x28 ),     /* Offset= 40 (92) */
+/* 54 */       NdrFcLong( 0x2 ),       /* 2 */
+/* 58 */       NdrFcShort( 0x28 ),     /* Offset= 40 (98) */
+/* 60 */       NdrFcLong( 0x3 ),       /* 3 */
+/* 64 */       NdrFcShort( 0x28 ),     /* Offset= 40 (104) */
+/* 66 */       NdrFcLong( 0x4 ),       /* 4 */
+/* 70 */       NdrFcShort( 0x28 ),     /* Offset= 40 (110) */
+/* 72 */       NdrFcLong( 0x5 ),       /* 5 */
+/* 76 */       NdrFcShort( 0x28 ),     /* Offset= 40 (116) */
+/* 78 */       NdrFcLong( 0x6 ),       /* 6 */
+/* 82 */       NdrFcShort( 0x2a ),     /* Offset= 42 (124) */
+/* 84 */       NdrFcLong( 0x7 ),       /* 7 */
+/* 88 */       NdrFcShort( 0x2e ),     /* Offset= 46 (134) */
+/* 90 */       NdrFcShort( 0xffff ),   /* Offset= -1 (89) */
+/* 92 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 94 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 96 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 98 */
+                       0x15,           /* FC_STRUCT */
+                       0x1,            /* 1 */
+/* 100 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 102 */      0x6,            /* FC_SHORT */
+                       0x5b,           /* FC_END */
+/* 104 */
+                       0x15,           /* FC_STRUCT */
+                       0x3,            /* 3 */
+/* 106 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 108 */      0x8,            /* FC_LONG */
+                       0x5b,           /* FC_END */
+/* 110 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 112 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 114 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 116 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 118 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 120 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 122 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 124 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 126 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 128 */      0x2,            /* FC_CHAR */
+                       0x4c,           /* FC_EMBEDDED_COMPLEX */
+/* 130 */      0x0,            /* 0 */
+                       NdrFcShort( 0xffd9 ),   /* Offset= -39 (92) */
+                       0x5b,           /* FC_END */
+/* 134 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 136 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 138 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 140 */      0x4c,           /* FC_EMBEDDED_COMPLEX */
+                       0x0,            /* 0 */
+/* 142 */      NdrFcShort( 0xffe0 ),   /* Offset= -32 (110) */
+/* 144 */      0x5c,           /* FC_PAD */
+                       0x5b,           /* FC_END */
+
+                       0x0
+        }
+    };
+
+static const unsigned short rpcecho_FormatStringOffsetTable[] =
+    {
+    0,
+    42,
+    84,
+    120,
+    156,
+    192,
+    234
+    };
+
+
+static const MIDL_STUB_DESC rpcecho_StubDesc =
+    {
+    (void *)& rpcecho___RpcClientInterface,
+    MIDL_user_allocate,
+    MIDL_user_free,
+    &rpcecho_IfHandle,
+    0,
+    0,
+    0,
+    0,
+    __MIDL_TypeFormatString.Format,
+    1, /* -error bounds_check flag */
+    0x50002, /* Ndr library version */
+    0,
+    0x6000169, /* MIDL Version 6.0.361 */
+    0,
+    0,
+    0,  /* notify & notify_flag routine table */
+    0x1, /* MIDL flag */
+    0, /* cs routines */
+    0,   /* proxy/server info */
+    0   /* Reserved5 */
+    };
+#if _MSC_VER >= 1200
+#pragma warning(pop)
+#endif
+
+
+#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/
+
+
+
+/* this ALWAYS GENERATED file contains the RPC client stubs */
+
+
+ /* File created by MIDL compiler version 6.00.0361 */
+/* at Fri Mar 04 15:19:13 2005
+ */
+/* Compiler settings for rpcecho.idl, rpcecho.acf:
+    Oicf, W1, Zp8, env=Win64 (32b run,appending)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#if defined(_M_IA64) || defined(_M_AMD64)
+
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+#if _MSC_VER >= 1200
+#pragma warning(push)
+#endif
+
+#pragma warning( disable: 4211 )  /* redefine extent to static */
+#pragma warning( disable: 4232 )  /* dllimport identity*/
+#include <string.h>
+
+#include "rpcecho.h"
+
+#define TYPE_FORMAT_STRING_SIZE   147
+#define PROC_FORMAT_STRING_SIZE   285
+#define TRANSMIT_AS_TABLE_SIZE    0
+#define WIRE_MARSHAL_TABLE_SIZE   0
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
+    } MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
+    } MIDL_PROC_FORMAT_STRING;
+
+
+static RPC_SYNTAX_IDENTIFIER  _RpcTransferSyntax =
+{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
+
+
+extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+#define GENERIC_BINDING_TABLE_SIZE   0
+
+
+/* Standard interface: rpcecho, ver. 4.0,
+   GUID={0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}} */
+
+handle_t rpcecho_IfHandle;
+
+
+static const RPC_CLIENT_INTERFACE rpcecho___RpcClientInterface =
+    {
+    sizeof(RPC_CLIENT_INTERFACE),
+    {{0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},{4,0}},
+    {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
+    0,
+    0,
+    0,
+    0,
+    0,
+    0x00000000
+    };
+RPC_IF_HANDLE rpcecho_v4_0_c_ifspec = (RPC_IF_HANDLE)& rpcecho___RpcClientInterface;
+
+extern const MIDL_STUB_DESC rpcecho_StubDesc;
+
+static RPC_BINDING_HANDLE rpcecho__MIDL_AutoBindHandle;
+
+
+void AddOne(
+    /* [in] */ long in_data,
+    /* [in] */ long in_data2,
+    /* [out] */ int *out_data)
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0],
+                  in_data,
+                  in_data2,
+                  out_data);
+
+}
+
+
+void EchoData(
+    /* [in] */ int len,
+    /* [size_is][in] */ unsigned char in_data[  ],
+    /* [size_is][out] */ unsigned char out_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[44],
+                  len,
+                  in_data,
+                  out_data);
+
+}
+
+
+void SinkData(
+    /* [in] */ int len,
+    /* [size_is][in] */ unsigned char in_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[88],
+                  len,
+                  in_data);
+
+}
+
+
+void SourceData(
+    /* [in] */ int len,
+    /* [size_is][out] */ unsigned char out_data[  ])
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[126],
+                  len,
+                  out_data);
+
+}
+
+
+void TestCall(
+    /* [string][in] */ wchar_t **s1,
+    /* [string][out] */ wchar_t **s2)
+{
+
+    NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[164],
+                  s1,
+                  s2);
+
+}
+
+
+long TestCall2(
+    /* [in] */ short level,
+    /* [switch_is][out] */ echo_Info **info)
+{
+
+    CLIENT_CALL_RETURN _RetVal;
+
+    _RetVal = NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[202],
+                  level,
+                  info);
+    return ( long  )_RetVal.Simple;
+
+}
+
+
+long TestSleep(
+    /* [in] */ long seconds)
+{
+
+    CLIENT_CALL_RETURN _RetVal;
+
+    _RetVal = NdrClientCall2(
+                  ( PMIDL_STUB_DESC  )&rpcecho_StubDesc,
+                  (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[246],
+                  seconds);
+    return ( long  )_RetVal.Simple;
+
+}
+
+
+#if !defined(__RPC_WIN64__)
+#error  Invalid build platform for this stub.
+#endif
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+    {
+        0,
+        {
+
+       /* Procedure AddOne */
+
+                       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/*  2 */       NdrFcLong( 0x0 ),       /* 0 */
+/*  6 */       NdrFcShort( 0x0 ),      /* 0 */
+/*  8 */       NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 10 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 12 */       NdrFcShort( 0x1c ),     /* 28 */
+/* 14 */       0x40,           /* Oi2 Flags:  has ext, */
+                       0x3,            /* 3 */
+/* 16 */       0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 18 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 20 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 22 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 24 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter in_data */
+
+/* 26 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 28 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 30 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data2 */
+
+/* 32 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 34 */       NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 36 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 38 */       NdrFcShort( 0x2150 ),   /* Flags:  out, base type, simple ref, srv alloc size=8 */
+/* 40 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 42 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure EchoData */
+
+/* 44 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 46 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 50 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 52 */       NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 54 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 56 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 58 */       0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x3,            /* 3 */
+/* 60 */       0xa,            /* 10 */
+                       0x7,            /* Ext Flags:  new corr desc, clt corr check, srv corr check, */
+/* 62 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 64 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 66 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 68 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 70 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 72 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 74 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 76 */       NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 78 */       NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 80 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Parameter out_data */
+
+/* 82 */       NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 84 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 86 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SinkData */
+
+/* 88 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 90 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 94 */       NdrFcShort( 0x2 ),      /* 2 */
+/* 96 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 98 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 100 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 102 */      0x42,           /* Oi2 Flags:  clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 104 */      0xa,            /* 10 */
+                       0x5,            /* Ext Flags:  new corr desc, srv corr check, */
+/* 106 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 108 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 110 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 112 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 114 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 116 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 118 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 120 */      NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 122 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 124 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SourceData */
+
+/* 126 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 128 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 132 */      NdrFcShort( 0x3 ),      /* 3 */
+/* 134 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 136 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 138 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 140 */      0x41,           /* Oi2 Flags:  srv must size, has ext, */
+                       0x2,            /* 2 */
+/* 142 */      0xa,            /* 10 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 144 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 146 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 148 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 150 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 152 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 154 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 156 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 158 */      NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 160 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 162 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure TestCall */
+
+/* 164 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 166 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 170 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 172 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 174 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 176 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 178 */      0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 180 */      0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 182 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 184 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 186 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 188 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter s1 */
+
+/* 190 */      NdrFcShort( 0x200b ),   /* Flags:  must size, must free, in, srv alloc size=8 */
+/* 192 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 194 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Parameter s2 */
+
+/* 196 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 198 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 200 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Procedure TestCall2 */
+
+/* 202 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 204 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 208 */      NdrFcShort( 0x5 ),      /* 5 */
+/* 210 */      NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 212 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 214 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 216 */      0x45,           /* Oi2 Flags:  srv must size, has return, has ext, */
+                       0x3,            /* 3 */
+/* 218 */      0xa,            /* 10 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 220 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 222 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 224 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 226 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter level */
+
+/* 228 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 230 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 232 */      0x6,            /* FC_SHORT */
+                       0x0,            /* 0 */
+
+       /* Parameter info */
+
+/* 234 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 236 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 238 */      NdrFcShort( 0x1a ),     /* Type Offset=26 */
+
+       /* Return value */
+
+/* 240 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 242 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 244 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestSleep */
+
+/* 246 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 248 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 252 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 254 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 256 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 258 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 260 */      0x44,           /* Oi2 Flags:  has return, has ext, */
+                       0x2,            /* 2 */
+/* 262 */      0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 264 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 266 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 268 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 270 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter seconds */
+
+/* 272 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 274 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 276 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Return value */
+
+/* 278 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 280 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 282 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+                       0x0
+        }
+    };
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+    {
+        0,
+        {
+                       NdrFcShort( 0x0 ),      /* 0 */
+/*  2 */
+                       0x11, 0xc,      /* FC_RP [alloced_on_stack] [simple_pointer] */
+/*  4 */       0x8,            /* FC_LONG */
+                       0x5c,           /* FC_PAD */
+/*  6 */
+                       0x1b,           /* FC_CARRAY */
+                       0x0,            /* 0 */
+/*  8 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 10 */       0x28,           /* Corr desc:  parameter, FC_LONG */
+                       0x0,            /*  */
+/* 12 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 14 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 16 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 18 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 20 */       NdrFcShort( 0x2 ),      /* Offset= 2 (22) */
+/* 22 */
+                       0x12, 0x8,      /* FC_UP [simple_pointer] */
+/* 24 */
+                       0x25,           /* FC_C_WSTRING */
+                       0x5c,           /* FC_PAD */
+/* 26 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 28 */       NdrFcShort( 0x2 ),      /* Offset= 2 (30) */
+/* 30 */
+                       0x12, 0x0,      /* FC_UP */
+/* 32 */       NdrFcShort( 0x2 ),      /* Offset= 2 (34) */
+/* 34 */
+                       0x2b,           /* FC_NON_ENCAPSULATED_UNION */
+                       0x6,            /* FC_SHORT */
+/* 36 */       0x26,           /* Corr desc:  parameter, FC_SHORT */
+                       0x0,            /*  */
+/* 38 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 40 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 42 */       NdrFcShort( 0x2 ),      /* Offset= 2 (44) */
+/* 44 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 46 */       NdrFcShort( 0x7 ),      /* 7 */
+/* 48 */       NdrFcLong( 0x1 ),       /* 1 */
+/* 52 */       NdrFcShort( 0x28 ),     /* Offset= 40 (92) */
+/* 54 */       NdrFcLong( 0x2 ),       /* 2 */
+/* 58 */       NdrFcShort( 0x28 ),     /* Offset= 40 (98) */
+/* 60 */       NdrFcLong( 0x3 ),       /* 3 */
+/* 64 */       NdrFcShort( 0x28 ),     /* Offset= 40 (104) */
+/* 66 */       NdrFcLong( 0x4 ),       /* 4 */
+/* 70 */       NdrFcShort( 0x28 ),     /* Offset= 40 (110) */
+/* 72 */       NdrFcLong( 0x5 ),       /* 5 */
+/* 76 */       NdrFcShort( 0x28 ),     /* Offset= 40 (116) */
+/* 78 */       NdrFcLong( 0x6 ),       /* 6 */
+/* 82 */       NdrFcShort( 0x2a ),     /* Offset= 42 (124) */
+/* 84 */       NdrFcLong( 0x7 ),       /* 7 */
+/* 88 */       NdrFcShort( 0x2e ),     /* Offset= 46 (134) */
+/* 90 */       NdrFcShort( 0xffff ),   /* Offset= -1 (89) */
+/* 92 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 94 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 96 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 98 */
+                       0x15,           /* FC_STRUCT */
+                       0x1,            /* 1 */
+/* 100 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 102 */      0x6,            /* FC_SHORT */
+                       0x5b,           /* FC_END */
+/* 104 */
+                       0x15,           /* FC_STRUCT */
+                       0x3,            /* 3 */
+/* 106 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 108 */      0x8,            /* FC_LONG */
+                       0x5b,           /* FC_END */
+/* 110 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 112 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 114 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 116 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 118 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 120 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 122 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 124 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 126 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 128 */      0x2,            /* FC_CHAR */
+                       0x4c,           /* FC_EMBEDDED_COMPLEX */
+/* 130 */      0x0,            /* 0 */
+                       NdrFcShort( 0xffd9 ),   /* Offset= -39 (92) */
+                       0x5b,           /* FC_END */
+/* 134 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 136 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 138 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 140 */      0x4c,           /* FC_EMBEDDED_COMPLEX */
+                       0x0,            /* 0 */
+/* 142 */      NdrFcShort( 0xffe0 ),   /* Offset= -32 (110) */
+/* 144 */      0x5c,           /* FC_PAD */
+                       0x5b,           /* FC_END */
+
+                       0x0
+        }
+    };
+
+static const unsigned short rpcecho_FormatStringOffsetTable[] =
+    {
+    0,
+    44,
+    88,
+    126,
+    164,
+    202,
+    246
+    };
+
+
+static const MIDL_STUB_DESC rpcecho_StubDesc =
+    {
+    (void *)& rpcecho___RpcClientInterface,
+    MIDL_user_allocate,
+    MIDL_user_free,
+    &rpcecho_IfHandle,
+    0,
+    0,
+    0,
+    0,
+    __MIDL_TypeFormatString.Format,
+    1, /* -error bounds_check flag */
+    0x50002, /* Ndr library version */
+    0,
+    0x6000169, /* MIDL Version 6.0.361 */
+    0,
+    0,
+    0,  /* notify & notify_flag routine table */
+    0x1, /* MIDL flag */
+    0, /* cs routines */
+    0,   /* proxy/server info */
+    0   /* Reserved5 */
+    };
+#if _MSC_VER >= 1200
+#pragma warning(pop)
+#endif
+
+
+#endif /* defined(_M_IA64) || defined(_M_AMD64)*/
diff --git a/testprogs/win32/rpcecho-win32-pipe/rpcecho_s.c b/testprogs/win32/rpcecho-win32-pipe/rpcecho_s.c
new file mode 100755 (executable)
index 0000000..e2090fe
--- /dev/null
@@ -0,0 +1,1149 @@
+
+
+/* this ALWAYS GENERATED file contains the RPC server stubs */
+
+
+ /* File created by MIDL compiler version 6.00.0361 */
+/* at Mon Aug 03 16:54:26 2009
+ */
+/* Compiler settings for rpcecho.idl, rpcecho.acf:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#if !defined(_M_IA64) && !defined(_M_AMD64)
+
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+#if _MSC_VER >= 1200
+#pragma warning(push)
+#endif
+#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */
+#pragma warning( disable: 4211 )  /* redefine extent to static */
+#pragma warning( disable: 4232 )  /* dllimport identity*/
+#include <string.h>
+#include "rpcecho.h"
+
+#define TYPE_FORMAT_STRING_SIZE   157
+#define PROC_FORMAT_STRING_SIZE   313
+#define TRANSMIT_AS_TABLE_SIZE    0
+#define WIRE_MARSHAL_TABLE_SIZE   0
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
+    } MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
+    } MIDL_PROC_FORMAT_STRING;
+
+
+static RPC_SYNTAX_IDENTIFIER  _RpcTransferSyntax =
+{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
+
+extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+/* Standard interface: rpcecho, ver. 4.0,
+   GUID={0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}} */
+
+
+extern const MIDL_SERVER_INFO rpcecho_ServerInfo;
+
+extern RPC_DISPATCH_TABLE rpcecho_v4_0_DispatchTable;
+
+static const RPC_SERVER_INTERFACE rpcecho___RpcServerInterface =
+    {
+    sizeof(RPC_SERVER_INTERFACE),
+    {{0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},{4,0}},
+    {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
+    &rpcecho_v4_0_DispatchTable,
+    0,
+    0,
+    0,
+    &rpcecho_ServerInfo,
+    0x04000001
+    };
+RPC_IF_HANDLE rpcecho_v4_0_s_ifspec = (RPC_IF_HANDLE)& rpcecho___RpcServerInterface;
+
+extern const MIDL_STUB_DESC rpcecho_StubDesc;
+
+
+#if !defined(__RPC_WIN32__)
+#error  Invalid build platform for this stub.
+#endif
+
+#if !(TARGET_IS_NT50_OR_LATER)
+#error You need a Windows 2000 or later to run this stub because it uses these features:
+#error   /robust command line switch.
+#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
+#error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
+#endif
+
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+    {
+        0,
+        {
+
+       /* Procedure AddOne */
+
+                       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/*  2 */       NdrFcLong( 0x0 ),       /* 0 */
+/*  6 */       NdrFcShort( 0x0 ),      /* 0 */
+/*  8 */       NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 10 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 12 */       NdrFcShort( 0x1c ),     /* 28 */
+/* 14 */       0x40,           /* Oi2 Flags:  has ext, */
+                       0x3,            /* 3 */
+/* 16 */       0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 18 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 20 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 22 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter in_data */
+
+/* 24 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 26 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 28 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data2 */
+
+/* 30 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 32 */       NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 34 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 36 */       NdrFcShort( 0x2150 ),   /* Flags:  out, base type, simple ref, srv alloc size=8 */
+/* 38 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 40 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure EchoData */
+
+/* 42 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 44 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 48 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 50 */       NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 52 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 54 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 56 */       0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x3,            /* 3 */
+/* 58 */       0x8,            /* 8 */
+                       0x7,            /* Ext Flags:  new corr desc, clt corr check, srv corr check, */
+/* 60 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 62 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 64 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 66 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 68 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 70 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 72 */       NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 74 */       NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 76 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Parameter out_data */
+
+/* 78 */       NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 80 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 82 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SinkData */
+
+/* 84 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 86 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 90 */       NdrFcShort( 0x2 ),      /* 2 */
+/* 92 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 94 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 96 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 98 */       0x42,           /* Oi2 Flags:  clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 100 */      0x8,            /* 8 */
+                       0x5,            /* Ext Flags:  new corr desc, srv corr check, */
+/* 102 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 104 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 106 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 108 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 110 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 112 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 114 */      NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 116 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 118 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SourceData */
+
+/* 120 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 122 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 126 */      NdrFcShort( 0x3 ),      /* 3 */
+/* 128 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 130 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 132 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 134 */      0x41,           /* Oi2 Flags:  srv must size, has ext, */
+                       0x2,            /* 2 */
+/* 136 */      0x8,            /* 8 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 138 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 140 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 142 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 144 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 146 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 148 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 150 */      NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 152 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 154 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure TestCall */
+
+/* 156 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 158 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 162 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 164 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 166 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 168 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 170 */      0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 172 */      0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 174 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 176 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 178 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter s1 */
+
+/* 180 */      NdrFcShort( 0x200b ),   /* Flags:  must size, must free, in, srv alloc size=8 */
+/* 182 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 184 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Parameter s2 */
+
+/* 186 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 188 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 190 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Procedure TestCall2 */
+
+/* 192 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 194 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 198 */      NdrFcShort( 0x5 ),      /* 5 */
+/* 200 */      NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 202 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 204 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 206 */      0x45,           /* Oi2 Flags:  srv must size, has return, has ext, */
+                       0x3,            /* 3 */
+/* 208 */      0x8,            /* 8 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 210 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 212 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 214 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter level */
+
+/* 216 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 218 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 220 */      0x6,            /* FC_SHORT */
+                       0x0,            /* 0 */
+
+       /* Parameter info */
+
+/* 222 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 224 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 226 */      NdrFcShort( 0x1a ),     /* Type Offset=26 */
+
+       /* Return value */
+
+/* 228 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 230 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 232 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestSleep */
+
+/* 234 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 236 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 240 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 242 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 244 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 246 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 248 */      0x44,           /* Oi2 Flags:  has return, has ext, */
+                       0x2,            /* 2 */
+/* 250 */      0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 252 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 254 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 256 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter seconds */
+
+/* 258 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 260 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 262 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Return value */
+
+/* 264 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 266 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 268 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestPipe */
+
+/* 270 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 272 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 276 */      NdrFcShort( 0x7 ),      /* 7 */
+/* 278 */      NdrFcShort( 0x18 ),     /* x86 Stack size/offset = 24 */
+/* 280 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 282 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 284 */      0x4c,           /* Oi2 Flags:  has return, has pipes, has ext, */
+                       0x3,            /* 3 */
+/* 286 */      0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 288 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 290 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 292 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter count */
+
+/* 294 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 296 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 298 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter __MIDL_0000 */
+
+/* 300 */      NdrFcShort( 0x14 ),     /* Flags:  pipe, out, */
+/* 302 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 304 */      NdrFcShort( 0x94 ),     /* Type Offset=148 */
+
+       /* Return value */
+
+/* 306 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 308 */      NdrFcShort( 0x14 ),     /* x86 Stack size/offset = 20 */
+/* 310 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+                       0x0
+        }
+    };
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+    {
+        0,
+        {
+                       NdrFcShort( 0x0 ),      /* 0 */
+/*  2 */
+                       0x11, 0xc,      /* FC_RP [alloced_on_stack] [simple_pointer] */
+/*  4 */       0x8,            /* FC_LONG */
+                       0x5c,           /* FC_PAD */
+/*  6 */
+                       0x1b,           /* FC_CARRAY */
+                       0x0,            /* 0 */
+/*  8 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 10 */       0x28,           /* Corr desc:  parameter, FC_LONG */
+                       0x0,            /*  */
+/* 12 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 14 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 16 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 18 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 20 */       NdrFcShort( 0x2 ),      /* Offset= 2 (22) */
+/* 22 */
+                       0x12, 0x8,      /* FC_UP [simple_pointer] */
+/* 24 */
+                       0x25,           /* FC_C_WSTRING */
+                       0x5c,           /* FC_PAD */
+/* 26 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 28 */       NdrFcShort( 0x2 ),      /* Offset= 2 (30) */
+/* 30 */
+                       0x12, 0x0,      /* FC_UP */
+/* 32 */       NdrFcShort( 0x2 ),      /* Offset= 2 (34) */
+/* 34 */
+                       0x2b,           /* FC_NON_ENCAPSULATED_UNION */
+                       0x6,            /* FC_SHORT */
+/* 36 */       0x26,           /* Corr desc:  parameter, FC_SHORT */
+                       0x0,            /*  */
+/* 38 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 40 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 42 */       NdrFcShort( 0x2 ),      /* Offset= 2 (44) */
+/* 44 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 46 */       NdrFcShort( 0x7 ),      /* 7 */
+/* 48 */       NdrFcLong( 0x1 ),       /* 1 */
+/* 52 */       NdrFcShort( 0x28 ),     /* Offset= 40 (92) */
+/* 54 */       NdrFcLong( 0x2 ),       /* 2 */
+/* 58 */       NdrFcShort( 0x28 ),     /* Offset= 40 (98) */
+/* 60 */       NdrFcLong( 0x3 ),       /* 3 */
+/* 64 */       NdrFcShort( 0x28 ),     /* Offset= 40 (104) */
+/* 66 */       NdrFcLong( 0x4 ),       /* 4 */
+/* 70 */       NdrFcShort( 0x28 ),     /* Offset= 40 (110) */
+/* 72 */       NdrFcLong( 0x5 ),       /* 5 */
+/* 76 */       NdrFcShort( 0x28 ),     /* Offset= 40 (116) */
+/* 78 */       NdrFcLong( 0x6 ),       /* 6 */
+/* 82 */       NdrFcShort( 0x2a ),     /* Offset= 42 (124) */
+/* 84 */       NdrFcLong( 0x7 ),       /* 7 */
+/* 88 */       NdrFcShort( 0x2e ),     /* Offset= 46 (134) */
+/* 90 */       NdrFcShort( 0xffff ),   /* Offset= -1 (89) */
+/* 92 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 94 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 96 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 98 */
+                       0x15,           /* FC_STRUCT */
+                       0x1,            /* 1 */
+/* 100 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 102 */      0x6,            /* FC_SHORT */
+                       0x5b,           /* FC_END */
+/* 104 */
+                       0x15,           /* FC_STRUCT */
+                       0x3,            /* 3 */
+/* 106 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 108 */      0x8,            /* FC_LONG */
+                       0x5b,           /* FC_END */
+/* 110 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 112 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 114 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 116 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 118 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 120 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 122 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 124 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 126 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 128 */      0x2,            /* FC_CHAR */
+                       0x4c,           /* FC_EMBEDDED_COMPLEX */
+/* 130 */      0x0,            /* 0 */
+                       NdrFcShort( 0xffd9 ),   /* Offset= -39 (92) */
+                       0x5b,           /* FC_END */
+/* 134 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 136 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 138 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 140 */      0x4c,           /* FC_EMBEDDED_COMPLEX */
+                       0x0,            /* 0 */
+/* 142 */      NdrFcShort( 0xffe0 ),   /* Offset= -32 (110) */
+/* 144 */      0x5c,           /* FC_PAD */
+                       0x5b,           /* FC_END */
+/* 146 */      0x1,            /* FC_BYTE */
+                       0x5c,           /* FC_PAD */
+/* 148 */      0xb5,           /* FC_PIPE */
+                       0x0,            /* 0 */
+/* 150 */      NdrFcShort( 0xfffc ),   /* Offset= -4 (146) */
+/* 152 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 154 */      NdrFcShort( 0x1 ),      /* 1 */
+
+                       0x0
+        }
+    };
+
+static const unsigned short rpcecho_FormatStringOffsetTable[] =
+    {
+    0,
+    42,
+    84,
+    120,
+    156,
+    192,
+    234,
+    270
+    };
+
+
+static const MIDL_STUB_DESC rpcecho_StubDesc =
+    {
+    (void *)& rpcecho___RpcServerInterface,
+    MIDL_user_allocate,
+    MIDL_user_free,
+    0,
+    0,
+    0,
+    0,
+    0,
+    __MIDL_TypeFormatString.Format,
+    1, /* -error bounds_check flag */
+    0x50002, /* Ndr library version */
+    0,
+    0x6000169, /* MIDL Version 6.0.361 */
+    0,
+    0,
+    0,  /* notify & notify_flag routine table */
+    0x1, /* MIDL flag */
+    0, /* cs routines */
+    0,   /* proxy/server info */
+    0   /* Reserved5 */
+    };
+
+static RPC_DISPATCH_FUNCTION rpcecho_table[] =
+    {
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    0
+    };
+RPC_DISPATCH_TABLE rpcecho_v4_0_DispatchTable =
+    {
+    8,
+    rpcecho_table
+    };
+
+static const SERVER_ROUTINE rpcecho_ServerRoutineTable[] =
+    {
+    (SERVER_ROUTINE)AddOne,
+    (SERVER_ROUTINE)EchoData,
+    (SERVER_ROUTINE)SinkData,
+    (SERVER_ROUTINE)SourceData,
+    (SERVER_ROUTINE)TestCall,
+    (SERVER_ROUTINE)TestCall2,
+    (SERVER_ROUTINE)TestSleep,
+    (SERVER_ROUTINE)TestPipe
+    };
+
+static const MIDL_SERVER_INFO rpcecho_ServerInfo =
+    {
+    &rpcecho_StubDesc,
+    rpcecho_ServerRoutineTable,
+    __MIDL_ProcFormatString.Format,
+    rpcecho_FormatStringOffsetTable,
+    0,
+    0,
+    0,
+    0};
+#if _MSC_VER >= 1200
+#pragma warning(pop)
+#endif
+
+
+#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/
+
+
+
+/* this ALWAYS GENERATED file contains the RPC server stubs */
+
+
+ /* File created by MIDL compiler version 6.00.0361 */
+/* at Mon Aug 03 16:54:26 2009
+ */
+/* Compiler settings for rpcecho.idl, rpcecho.acf:
+    Oicf, W1, Zp8, env=Win64 (32b run,appending)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#if defined(_M_IA64) || defined(_M_AMD64)
+
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+#if _MSC_VER >= 1200
+#pragma warning(push)
+#endif
+
+#pragma warning( disable: 4211 )  /* redefine extent to static */
+#pragma warning( disable: 4232 )  /* dllimport identity*/
+#include <string.h>
+#include "rpcecho.h"
+
+#define TYPE_FORMAT_STRING_SIZE   157
+#define PROC_FORMAT_STRING_SIZE   329
+#define TRANSMIT_AS_TABLE_SIZE    0
+#define WIRE_MARSHAL_TABLE_SIZE   0
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
+    } MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
+    } MIDL_PROC_FORMAT_STRING;
+
+
+static RPC_SYNTAX_IDENTIFIER  _RpcTransferSyntax =
+{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
+
+extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+/* Standard interface: rpcecho, ver. 4.0,
+   GUID={0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}} */
+
+
+extern const MIDL_SERVER_INFO rpcecho_ServerInfo;
+
+extern RPC_DISPATCH_TABLE rpcecho_v4_0_DispatchTable;
+
+static const RPC_SERVER_INTERFACE rpcecho___RpcServerInterface =
+    {
+    sizeof(RPC_SERVER_INTERFACE),
+    {{0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},{4,0}},
+    {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
+    &rpcecho_v4_0_DispatchTable,
+    0,
+    0,
+    0,
+    &rpcecho_ServerInfo,
+    0x04000001
+    };
+RPC_IF_HANDLE rpcecho_v4_0_s_ifspec = (RPC_IF_HANDLE)& rpcecho___RpcServerInterface;
+
+extern const MIDL_STUB_DESC rpcecho_StubDesc;
+
+
+#if !defined(__RPC_WIN64__)
+#error  Invalid build platform for this stub.
+#endif
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+    {
+        0,
+        {
+
+       /* Procedure AddOne */
+
+                       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/*  2 */       NdrFcLong( 0x0 ),       /* 0 */
+/*  6 */       NdrFcShort( 0x0 ),      /* 0 */
+/*  8 */       NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 10 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 12 */       NdrFcShort( 0x1c ),     /* 28 */
+/* 14 */       0x40,           /* Oi2 Flags:  has ext, */
+                       0x3,            /* 3 */
+/* 16 */       0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 18 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 20 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 22 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 24 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter in_data */
+
+/* 26 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 28 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 30 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data2 */
+
+/* 32 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 34 */       NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 36 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 38 */       NdrFcShort( 0x2150 ),   /* Flags:  out, base type, simple ref, srv alloc size=8 */
+/* 40 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 42 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure EchoData */
+
+/* 44 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 46 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 50 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 52 */       NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 54 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 56 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 58 */       0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x3,            /* 3 */
+/* 60 */       0xa,            /* 10 */
+                       0x7,            /* Ext Flags:  new corr desc, clt corr check, srv corr check, */
+/* 62 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 64 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 66 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 68 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 70 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 72 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 74 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 76 */       NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 78 */       NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 80 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Parameter out_data */
+
+/* 82 */       NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 84 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 86 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SinkData */
+
+/* 88 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 90 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 94 */       NdrFcShort( 0x2 ),      /* 2 */
+/* 96 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 98 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 100 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 102 */      0x42,           /* Oi2 Flags:  clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 104 */      0xa,            /* 10 */
+                       0x5,            /* Ext Flags:  new corr desc, srv corr check, */
+/* 106 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 108 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 110 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 112 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 114 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 116 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 118 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 120 */      NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 122 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 124 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SourceData */
+
+/* 126 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 128 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 132 */      NdrFcShort( 0x3 ),      /* 3 */
+/* 134 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 136 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 138 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 140 */      0x41,           /* Oi2 Flags:  srv must size, has ext, */
+                       0x2,            /* 2 */
+/* 142 */      0xa,            /* 10 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 144 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 146 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 148 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 150 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 152 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 154 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 156 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 158 */      NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 160 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 162 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure TestCall */
+
+/* 164 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 166 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 170 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 172 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 174 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 176 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 178 */      0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 180 */      0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 182 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 184 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 186 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 188 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter s1 */
+
+/* 190 */      NdrFcShort( 0x200b ),   /* Flags:  must size, must free, in, srv alloc size=8 */
+/* 192 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 194 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Parameter s2 */
+
+/* 196 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 198 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 200 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Procedure TestCall2 */
+
+/* 202 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 204 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 208 */      NdrFcShort( 0x5 ),      /* 5 */
+/* 210 */      NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 212 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 214 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 216 */      0x45,           /* Oi2 Flags:  srv must size, has return, has ext, */
+                       0x3,            /* 3 */
+/* 218 */      0xa,            /* 10 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 220 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 222 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 224 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 226 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter level */
+
+/* 228 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 230 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 232 */      0x6,            /* FC_SHORT */
+                       0x0,            /* 0 */
+
+       /* Parameter info */
+
+/* 234 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 236 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 238 */      NdrFcShort( 0x1a ),     /* Type Offset=26 */
+
+       /* Return value */
+
+/* 240 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 242 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 244 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestSleep */
+
+/* 246 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 248 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 252 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 254 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 256 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 258 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 260 */      0x44,           /* Oi2 Flags:  has return, has ext, */
+                       0x2,            /* 2 */
+/* 262 */      0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 264 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 266 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 268 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 270 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter seconds */
+
+/* 272 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 274 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 276 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Return value */
+
+/* 278 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 280 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 282 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestPipe */
+
+/* 284 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 286 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 290 */      NdrFcShort( 0x7 ),      /* 7 */
+/* 292 */      NdrFcShort( 0x30 ),     /* ia64 Stack size/offset = 48 */
+/* 294 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 296 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 298 */      0x4c,           /* Oi2 Flags:  has return, has pipes, has ext, */
+                       0x3,            /* 3 */
+/* 300 */      0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 302 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 304 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 306 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 308 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter count */
+
+/* 310 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 312 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 314 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter __MIDL_0000 */
+
+/* 316 */      NdrFcShort( 0x14 ),     /* Flags:  pipe, out, */
+/* 318 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 320 */      NdrFcShort( 0x94 ),     /* Type Offset=148 */
+
+       /* Return value */
+
+/* 322 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 324 */      NdrFcShort( 0x28 ),     /* ia64 Stack size/offset = 40 */
+/* 326 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+                       0x0
+        }
+    };
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+    {
+        0,
+        {
+                       NdrFcShort( 0x0 ),      /* 0 */
+/*  2 */
+                       0x11, 0xc,      /* FC_RP [alloced_on_stack] [simple_pointer] */
+/*  4 */       0x8,            /* FC_LONG */
+                       0x5c,           /* FC_PAD */
+/*  6 */
+                       0x1b,           /* FC_CARRAY */
+                       0x0,            /* 0 */
+/*  8 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 10 */       0x28,           /* Corr desc:  parameter, FC_LONG */
+                       0x0,            /*  */
+/* 12 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 14 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 16 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 18 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 20 */       NdrFcShort( 0x2 ),      /* Offset= 2 (22) */
+/* 22 */
+                       0x12, 0x8,      /* FC_UP [simple_pointer] */
+/* 24 */
+                       0x25,           /* FC_C_WSTRING */
+                       0x5c,           /* FC_PAD */
+/* 26 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 28 */       NdrFcShort( 0x2 ),      /* Offset= 2 (30) */
+/* 30 */
+                       0x12, 0x0,      /* FC_UP */
+/* 32 */       NdrFcShort( 0x2 ),      /* Offset= 2 (34) */
+/* 34 */
+                       0x2b,           /* FC_NON_ENCAPSULATED_UNION */
+                       0x6,            /* FC_SHORT */
+/* 36 */       0x26,           /* Corr desc:  parameter, FC_SHORT */
+                       0x0,            /*  */
+/* 38 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 40 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 42 */       NdrFcShort( 0x2 ),      /* Offset= 2 (44) */
+/* 44 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 46 */       NdrFcShort( 0x7 ),      /* 7 */
+/* 48 */       NdrFcLong( 0x1 ),       /* 1 */
+/* 52 */       NdrFcShort( 0x28 ),     /* Offset= 40 (92) */
+/* 54 */       NdrFcLong( 0x2 ),       /* 2 */
+/* 58 */       NdrFcShort( 0x28 ),     /* Offset= 40 (98) */
+/* 60 */       NdrFcLong( 0x3 ),       /* 3 */
+/* 64 */       NdrFcShort( 0x28 ),     /* Offset= 40 (104) */
+/* 66 */       NdrFcLong( 0x4 ),       /* 4 */
+/* 70 */       NdrFcShort( 0x28 ),     /* Offset= 40 (110) */
+/* 72 */       NdrFcLong( 0x5 ),       /* 5 */
+/* 76 */       NdrFcShort( 0x28 ),     /* Offset= 40 (116) */
+/* 78 */       NdrFcLong( 0x6 ),       /* 6 */
+/* 82 */       NdrFcShort( 0x2a ),     /* Offset= 42 (124) */
+/* 84 */       NdrFcLong( 0x7 ),       /* 7 */
+/* 88 */       NdrFcShort( 0x2e ),     /* Offset= 46 (134) */
+/* 90 */       NdrFcShort( 0xffff ),   /* Offset= -1 (89) */
+/* 92 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 94 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 96 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 98 */
+                       0x15,           /* FC_STRUCT */
+                       0x1,            /* 1 */
+/* 100 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 102 */      0x6,            /* FC_SHORT */
+                       0x5b,           /* FC_END */
+/* 104 */
+                       0x15,           /* FC_STRUCT */
+                       0x3,            /* 3 */
+/* 106 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 108 */      0x8,            /* FC_LONG */
+                       0x5b,           /* FC_END */
+/* 110 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 112 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 114 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 116 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 118 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 120 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 122 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 124 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 126 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 128 */      0x2,            /* FC_CHAR */
+                       0x4c,           /* FC_EMBEDDED_COMPLEX */
+/* 130 */      0x0,            /* 0 */
+                       NdrFcShort( 0xffd9 ),   /* Offset= -39 (92) */
+                       0x5b,           /* FC_END */
+/* 134 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 136 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 138 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 140 */      0x4c,           /* FC_EMBEDDED_COMPLEX */
+                       0x0,            /* 0 */
+/* 142 */      NdrFcShort( 0xffe0 ),   /* Offset= -32 (110) */
+/* 144 */      0x5c,           /* FC_PAD */
+                       0x5b,           /* FC_END */
+/* 146 */      0x1,            /* FC_BYTE */
+                       0x5c,           /* FC_PAD */
+/* 148 */      0xb5,           /* FC_PIPE */
+                       0x0,            /* 0 */
+/* 150 */      NdrFcShort( 0xfffc ),   /* Offset= -4 (146) */
+/* 152 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 154 */      NdrFcShort( 0x1 ),      /* 1 */
+
+                       0x0
+        }
+    };
+
+static const unsigned short rpcecho_FormatStringOffsetTable[] =
+    {
+    0,
+    44,
+    88,
+    126,
+    164,
+    202,
+    246,
+    284
+    };
+
+
+static const MIDL_STUB_DESC rpcecho_StubDesc =
+    {
+    (void *)& rpcecho___RpcServerInterface,
+    MIDL_user_allocate,
+    MIDL_user_free,
+    0,
+    0,
+    0,
+    0,
+    0,
+    __MIDL_TypeFormatString.Format,
+    1, /* -error bounds_check flag */
+    0x50002, /* Ndr library version */
+    0,
+    0x6000169, /* MIDL Version 6.0.361 */
+    0,
+    0,
+    0,  /* notify & notify_flag routine table */
+    0x1, /* MIDL flag */
+    0, /* cs routines */
+    0,   /* proxy/server info */
+    0   /* Reserved5 */
+    };
+
+static RPC_DISPATCH_FUNCTION rpcecho_table[] =
+    {
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    0
+    };
+RPC_DISPATCH_TABLE rpcecho_v4_0_DispatchTable =
+    {
+    8,
+    rpcecho_table
+    };
+
+static const SERVER_ROUTINE rpcecho_ServerRoutineTable[] =
+    {
+    (SERVER_ROUTINE)AddOne,
+    (SERVER_ROUTINE)EchoData,
+    (SERVER_ROUTINE)SinkData,
+    (SERVER_ROUTINE)SourceData,
+    (SERVER_ROUTINE)TestCall,
+    (SERVER_ROUTINE)TestCall2,
+    (SERVER_ROUTINE)TestSleep,
+    (SERVER_ROUTINE)TestPipe
+    };
+
+static const MIDL_SERVER_INFO rpcecho_ServerInfo =
+    {
+    &rpcecho_StubDesc,
+    rpcecho_ServerRoutineTable,
+    __MIDL_ProcFormatString.Format,
+    rpcecho_FormatStringOffsetTable,
+    0,
+    0,
+    0,
+    0};
+#if _MSC_VER >= 1200
+#pragma warning(pop)
+#endif
+
+
+#endif /* defined(_M_IA64) || defined(_M_AMD64)*/
diff --git a/testprogs/win32/rpcecho-win32-pipe/rpcecho_s.c.bak b/testprogs/win32/rpcecho-win32-pipe/rpcecho_s.c.bak
new file mode 100755 (executable)
index 0000000..ae39d2a
--- /dev/null
@@ -0,0 +1,1054 @@
+
+
+/* this ALWAYS GENERATED file contains the RPC server stubs */
+
+
+ /* File created by MIDL compiler version 6.00.0361 */
+/* at Fri Mar 04 15:19:13 2005
+ */
+/* Compiler settings for rpcecho.idl, rpcecho.acf:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#if !defined(_M_IA64) && !defined(_M_AMD64)
+
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+#if _MSC_VER >= 1200
+#pragma warning(push)
+#endif
+#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */
+#pragma warning( disable: 4211 )  /* redefine extent to static */
+#pragma warning( disable: 4232 )  /* dllimport identity*/
+#include <string.h>
+#include "rpcecho.h"
+
+#define TYPE_FORMAT_STRING_SIZE   147
+#define PROC_FORMAT_STRING_SIZE   271
+#define TRANSMIT_AS_TABLE_SIZE    0
+#define WIRE_MARSHAL_TABLE_SIZE   0
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
+    } MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
+    } MIDL_PROC_FORMAT_STRING;
+
+
+static RPC_SYNTAX_IDENTIFIER  _RpcTransferSyntax =
+{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
+
+extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+/* Standard interface: rpcecho, ver. 4.0,
+   GUID={0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}} */
+
+
+extern const MIDL_SERVER_INFO rpcecho_ServerInfo;
+
+extern RPC_DISPATCH_TABLE rpcecho_v4_0_DispatchTable;
+
+static const RPC_SERVER_INTERFACE rpcecho___RpcServerInterface =
+    {
+    sizeof(RPC_SERVER_INTERFACE),
+    {{0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},{4,0}},
+    {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
+    &rpcecho_v4_0_DispatchTable,
+    0,
+    0,
+    0,
+    &rpcecho_ServerInfo,
+    0x04000000
+    };
+RPC_IF_HANDLE rpcecho_v4_0_s_ifspec = (RPC_IF_HANDLE)& rpcecho___RpcServerInterface;
+
+extern const MIDL_STUB_DESC rpcecho_StubDesc;
+
+
+#if !defined(__RPC_WIN32__)
+#error  Invalid build platform for this stub.
+#endif
+
+#if !(TARGET_IS_NT50_OR_LATER)
+#error You need a Windows 2000 or later to run this stub because it uses these features:
+#error   /robust command line switch.
+#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
+#error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
+#endif
+
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+    {
+        0,
+        {
+
+       /* Procedure AddOne */
+
+                       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/*  2 */       NdrFcLong( 0x0 ),       /* 0 */
+/*  6 */       NdrFcShort( 0x0 ),      /* 0 */
+/*  8 */       NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 10 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 12 */       NdrFcShort( 0x1c ),     /* 28 */
+/* 14 */       0x40,           /* Oi2 Flags:  has ext, */
+                       0x3,            /* 3 */
+/* 16 */       0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 18 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 20 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 22 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter in_data */
+
+/* 24 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 26 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 28 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data2 */
+
+/* 30 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 32 */       NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 34 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 36 */       NdrFcShort( 0x2150 ),   /* Flags:  out, base type, simple ref, srv alloc size=8 */
+/* 38 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 40 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure EchoData */
+
+/* 42 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 44 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 48 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 50 */       NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 52 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 54 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 56 */       0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x3,            /* 3 */
+/* 58 */       0x8,            /* 8 */
+                       0x7,            /* Ext Flags:  new corr desc, clt corr check, srv corr check, */
+/* 60 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 62 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 64 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 66 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 68 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 70 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 72 */       NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 74 */       NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 76 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Parameter out_data */
+
+/* 78 */       NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 80 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 82 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SinkData */
+
+/* 84 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 86 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 90 */       NdrFcShort( 0x2 ),      /* 2 */
+/* 92 */       NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 94 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 96 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 98 */       0x42,           /* Oi2 Flags:  clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 100 */      0x8,            /* 8 */
+                       0x5,            /* Ext Flags:  new corr desc, srv corr check, */
+/* 102 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 104 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 106 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 108 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 110 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 112 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 114 */      NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 116 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 118 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SourceData */
+
+/* 120 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 122 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 126 */      NdrFcShort( 0x3 ),      /* 3 */
+/* 128 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 130 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 132 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 134 */      0x41,           /* Oi2 Flags:  srv must size, has ext, */
+                       0x2,            /* 2 */
+/* 136 */      0x8,            /* 8 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 138 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 140 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 142 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 144 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 146 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 148 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 150 */      NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 152 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 154 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure TestCall */
+
+/* 156 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 158 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 162 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 164 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 166 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 168 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 170 */      0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 172 */      0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 174 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 176 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 178 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter s1 */
+
+/* 180 */      NdrFcShort( 0x200b ),   /* Flags:  must size, must free, in, srv alloc size=8 */
+/* 182 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 184 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Parameter s2 */
+
+/* 186 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 188 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 190 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Procedure TestCall2 */
+
+/* 192 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 194 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 198 */      NdrFcShort( 0x5 ),      /* 5 */
+/* 200 */      NdrFcShort( 0xc ),      /* x86 Stack size/offset = 12 */
+/* 202 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 204 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 206 */      0x45,           /* Oi2 Flags:  srv must size, has return, has ext, */
+                       0x3,            /* 3 */
+/* 208 */      0x8,            /* 8 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 210 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 212 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 214 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter level */
+
+/* 216 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 218 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 220 */      0x6,            /* FC_SHORT */
+                       0x0,            /* 0 */
+
+       /* Parameter info */
+
+/* 222 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 224 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 226 */      NdrFcShort( 0x1a ),     /* Type Offset=26 */
+
+       /* Return value */
+
+/* 228 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 230 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 232 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestSleep */
+
+/* 234 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 236 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 240 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 242 */      NdrFcShort( 0x8 ),      /* x86 Stack size/offset = 8 */
+/* 244 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 246 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 248 */      0x44,           /* Oi2 Flags:  has return, has ext, */
+                       0x2,            /* 2 */
+/* 250 */      0x8,            /* 8 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 252 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 254 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 256 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter seconds */
+
+/* 258 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 260 */      NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 262 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Return value */
+
+/* 264 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 266 */      NdrFcShort( 0x4 ),      /* x86 Stack size/offset = 4 */
+/* 268 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+                       0x0
+        }
+    };
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+    {
+        0,
+        {
+                       NdrFcShort( 0x0 ),      /* 0 */
+/*  2 */
+                       0x11, 0xc,      /* FC_RP [alloced_on_stack] [simple_pointer] */
+/*  4 */       0x8,            /* FC_LONG */
+                       0x5c,           /* FC_PAD */
+/*  6 */
+                       0x1b,           /* FC_CARRAY */
+                       0x0,            /* 0 */
+/*  8 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 10 */       0x28,           /* Corr desc:  parameter, FC_LONG */
+                       0x0,            /*  */
+/* 12 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 14 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 16 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 18 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 20 */       NdrFcShort( 0x2 ),      /* Offset= 2 (22) */
+/* 22 */
+                       0x12, 0x8,      /* FC_UP [simple_pointer] */
+/* 24 */
+                       0x25,           /* FC_C_WSTRING */
+                       0x5c,           /* FC_PAD */
+/* 26 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 28 */       NdrFcShort( 0x2 ),      /* Offset= 2 (30) */
+/* 30 */
+                       0x12, 0x0,      /* FC_UP */
+/* 32 */       NdrFcShort( 0x2 ),      /* Offset= 2 (34) */
+/* 34 */
+                       0x2b,           /* FC_NON_ENCAPSULATED_UNION */
+                       0x6,            /* FC_SHORT */
+/* 36 */       0x26,           /* Corr desc:  parameter, FC_SHORT */
+                       0x0,            /*  */
+/* 38 */       NdrFcShort( 0x0 ),      /* x86 Stack size/offset = 0 */
+/* 40 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 42 */       NdrFcShort( 0x2 ),      /* Offset= 2 (44) */
+/* 44 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 46 */       NdrFcShort( 0x7 ),      /* 7 */
+/* 48 */       NdrFcLong( 0x1 ),       /* 1 */
+/* 52 */       NdrFcShort( 0x28 ),     /* Offset= 40 (92) */
+/* 54 */       NdrFcLong( 0x2 ),       /* 2 */
+/* 58 */       NdrFcShort( 0x28 ),     /* Offset= 40 (98) */
+/* 60 */       NdrFcLong( 0x3 ),       /* 3 */
+/* 64 */       NdrFcShort( 0x28 ),     /* Offset= 40 (104) */
+/* 66 */       NdrFcLong( 0x4 ),       /* 4 */
+/* 70 */       NdrFcShort( 0x28 ),     /* Offset= 40 (110) */
+/* 72 */       NdrFcLong( 0x5 ),       /* 5 */
+/* 76 */       NdrFcShort( 0x28 ),     /* Offset= 40 (116) */
+/* 78 */       NdrFcLong( 0x6 ),       /* 6 */
+/* 82 */       NdrFcShort( 0x2a ),     /* Offset= 42 (124) */
+/* 84 */       NdrFcLong( 0x7 ),       /* 7 */
+/* 88 */       NdrFcShort( 0x2e ),     /* Offset= 46 (134) */
+/* 90 */       NdrFcShort( 0xffff ),   /* Offset= -1 (89) */
+/* 92 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 94 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 96 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 98 */
+                       0x15,           /* FC_STRUCT */
+                       0x1,            /* 1 */
+/* 100 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 102 */      0x6,            /* FC_SHORT */
+                       0x5b,           /* FC_END */
+/* 104 */
+                       0x15,           /* FC_STRUCT */
+                       0x3,            /* 3 */
+/* 106 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 108 */      0x8,            /* FC_LONG */
+                       0x5b,           /* FC_END */
+/* 110 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 112 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 114 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 116 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 118 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 120 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 122 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 124 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 126 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 128 */      0x2,            /* FC_CHAR */
+                       0x4c,           /* FC_EMBEDDED_COMPLEX */
+/* 130 */      0x0,            /* 0 */
+                       NdrFcShort( 0xffd9 ),   /* Offset= -39 (92) */
+                       0x5b,           /* FC_END */
+/* 134 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 136 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 138 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 140 */      0x4c,           /* FC_EMBEDDED_COMPLEX */
+                       0x0,            /* 0 */
+/* 142 */      NdrFcShort( 0xffe0 ),   /* Offset= -32 (110) */
+/* 144 */      0x5c,           /* FC_PAD */
+                       0x5b,           /* FC_END */
+
+                       0x0
+        }
+    };
+
+static const unsigned short rpcecho_FormatStringOffsetTable[] =
+    {
+    0,
+    42,
+    84,
+    120,
+    156,
+    192,
+    234
+    };
+
+
+static const MIDL_STUB_DESC rpcecho_StubDesc =
+    {
+    (void *)& rpcecho___RpcServerInterface,
+    MIDL_user_allocate,
+    MIDL_user_free,
+    0,
+    0,
+    0,
+    0,
+    0,
+    __MIDL_TypeFormatString.Format,
+    1, /* -error bounds_check flag */
+    0x50002, /* Ndr library version */
+    0,
+    0x6000169, /* MIDL Version 6.0.361 */
+    0,
+    0,
+    0,  /* notify & notify_flag routine table */
+    0x1, /* MIDL flag */
+    0, /* cs routines */
+    0,   /* proxy/server info */
+    0   /* Reserved5 */
+    };
+
+static RPC_DISPATCH_FUNCTION rpcecho_table[] =
+    {
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    0
+    };
+RPC_DISPATCH_TABLE rpcecho_v4_0_DispatchTable =
+    {
+    7,
+    rpcecho_table
+    };
+
+static const SERVER_ROUTINE rpcecho_ServerRoutineTable[] =
+    {
+    (SERVER_ROUTINE)AddOne,
+    (SERVER_ROUTINE)EchoData,
+    (SERVER_ROUTINE)SinkData,
+    (SERVER_ROUTINE)SourceData,
+    (SERVER_ROUTINE)TestCall,
+    (SERVER_ROUTINE)TestCall2,
+    (SERVER_ROUTINE)TestSleep
+    };
+
+static const MIDL_SERVER_INFO rpcecho_ServerInfo =
+    {
+    &rpcecho_StubDesc,
+    rpcecho_ServerRoutineTable,
+    __MIDL_ProcFormatString.Format,
+    rpcecho_FormatStringOffsetTable,
+    0,
+    0,
+    0,
+    0};
+#if _MSC_VER >= 1200
+#pragma warning(pop)
+#endif
+
+
+#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/
+
+
+
+/* this ALWAYS GENERATED file contains the RPC server stubs */
+
+
+ /* File created by MIDL compiler version 6.00.0361 */
+/* at Fri Mar 04 15:19:13 2005
+ */
+/* Compiler settings for rpcecho.idl, rpcecho.acf:
+    Oicf, W1, Zp8, env=Win64 (32b run,appending)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#if defined(_M_IA64) || defined(_M_AMD64)
+
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+#if _MSC_VER >= 1200
+#pragma warning(push)
+#endif
+
+#pragma warning( disable: 4211 )  /* redefine extent to static */
+#pragma warning( disable: 4232 )  /* dllimport identity*/
+#include <string.h>
+#include "rpcecho.h"
+
+#define TYPE_FORMAT_STRING_SIZE   147
+#define PROC_FORMAT_STRING_SIZE   285
+#define TRANSMIT_AS_TABLE_SIZE    0
+#define WIRE_MARSHAL_TABLE_SIZE   0
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
+    } MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+    {
+    short          Pad;
+    unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
+    } MIDL_PROC_FORMAT_STRING;
+
+
+static RPC_SYNTAX_IDENTIFIER  _RpcTransferSyntax =
+{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
+
+extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+/* Standard interface: rpcecho, ver. 4.0,
+   GUID={0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}} */
+
+
+extern const MIDL_SERVER_INFO rpcecho_ServerInfo;
+
+extern RPC_DISPATCH_TABLE rpcecho_v4_0_DispatchTable;
+
+static const RPC_SERVER_INTERFACE rpcecho___RpcServerInterface =
+    {
+    sizeof(RPC_SERVER_INTERFACE),
+    {{0xe3514235,0x4b06,0x11d1,{0xab,0x04,0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},{4,0}},
+    {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
+    &rpcecho_v4_0_DispatchTable,
+    0,
+    0,
+    0,
+    &rpcecho_ServerInfo,
+    0x04000000
+    };
+RPC_IF_HANDLE rpcecho_v4_0_s_ifspec = (RPC_IF_HANDLE)& rpcecho___RpcServerInterface;
+
+extern const MIDL_STUB_DESC rpcecho_StubDesc;
+
+
+#if !defined(__RPC_WIN64__)
+#error  Invalid build platform for this stub.
+#endif
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+    {
+        0,
+        {
+
+       /* Procedure AddOne */
+
+                       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/*  2 */       NdrFcLong( 0x0 ),       /* 0 */
+/*  6 */       NdrFcShort( 0x0 ),      /* 0 */
+/*  8 */       NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 10 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 12 */       NdrFcShort( 0x1c ),     /* 28 */
+/* 14 */       0x40,           /* Oi2 Flags:  has ext, */
+                       0x3,            /* 3 */
+/* 16 */       0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 18 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 20 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 22 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 24 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter in_data */
+
+/* 26 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 28 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 30 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data2 */
+
+/* 32 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 34 */       NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 36 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 38 */       NdrFcShort( 0x2150 ),   /* Flags:  out, base type, simple ref, srv alloc size=8 */
+/* 40 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 42 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure EchoData */
+
+/* 44 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 46 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 50 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 52 */       NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 54 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 56 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 58 */       0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x3,            /* 3 */
+/* 60 */       0xa,            /* 10 */
+                       0x7,            /* Ext Flags:  new corr desc, clt corr check, srv corr check, */
+/* 62 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 64 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 66 */       NdrFcShort( 0x0 ),      /* 0 */
+/* 68 */       NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 70 */       NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 72 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 74 */       0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 76 */       NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 78 */       NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 80 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Parameter out_data */
+
+/* 82 */       NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 84 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 86 */       NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SinkData */
+
+/* 88 */       0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 90 */       NdrFcLong( 0x0 ),       /* 0 */
+/* 94 */       NdrFcShort( 0x2 ),      /* 2 */
+/* 96 */       NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 98 */       NdrFcShort( 0x8 ),      /* 8 */
+/* 100 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 102 */      0x42,           /* Oi2 Flags:  clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 104 */      0xa,            /* 10 */
+                       0x5,            /* Ext Flags:  new corr desc, srv corr check, */
+/* 106 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 108 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 110 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 112 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 114 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 116 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 118 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter in_data */
+
+/* 120 */      NdrFcShort( 0xb ),      /* Flags:  must size, must free, in, */
+/* 122 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 124 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure SourceData */
+
+/* 126 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 128 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 132 */      NdrFcShort( 0x3 ),      /* 3 */
+/* 134 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 136 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 138 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 140 */      0x41,           /* Oi2 Flags:  srv must size, has ext, */
+                       0x2,            /* 2 */
+/* 142 */      0xa,            /* 10 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 144 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 146 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 148 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 150 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter len */
+
+/* 152 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 154 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 156 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Parameter out_data */
+
+/* 158 */      NdrFcShort( 0x13 ),     /* Flags:  must size, must free, out, */
+/* 160 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 162 */      NdrFcShort( 0x6 ),      /* Type Offset=6 */
+
+       /* Procedure TestCall */
+
+/* 164 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 166 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 170 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 172 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 174 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 176 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 178 */      0x43,           /* Oi2 Flags:  srv must size, clt must size, has ext, */
+                       0x2,            /* 2 */
+/* 180 */      0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 182 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 184 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 186 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 188 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter s1 */
+
+/* 190 */      NdrFcShort( 0x200b ),   /* Flags:  must size, must free, in, srv alloc size=8 */
+/* 192 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 194 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Parameter s2 */
+
+/* 196 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 198 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 200 */      NdrFcShort( 0x12 ),     /* Type Offset=18 */
+
+       /* Procedure TestCall2 */
+
+/* 202 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 204 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 208 */      NdrFcShort( 0x5 ),      /* 5 */
+/* 210 */      NdrFcShort( 0x18 ),     /* ia64 Stack size/offset = 24 */
+/* 212 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 214 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 216 */      0x45,           /* Oi2 Flags:  srv must size, has return, has ext, */
+                       0x3,            /* 3 */
+/* 218 */      0xa,            /* 10 */
+                       0x3,            /* Ext Flags:  new corr desc, clt corr check, */
+/* 220 */      NdrFcShort( 0x1 ),      /* 1 */
+/* 222 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 224 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 226 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter level */
+
+/* 228 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 230 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 232 */      0x6,            /* FC_SHORT */
+                       0x0,            /* 0 */
+
+       /* Parameter info */
+
+/* 234 */      NdrFcShort( 0x2013 ),   /* Flags:  must size, must free, out, srv alloc size=8 */
+/* 236 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 238 */      NdrFcShort( 0x1a ),     /* Type Offset=26 */
+
+       /* Return value */
+
+/* 240 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 242 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 244 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Procedure TestSleep */
+
+/* 246 */      0x32,           /* FC_BIND_PRIMITIVE */
+                       0x48,           /* Old Flags:  */
+/* 248 */      NdrFcLong( 0x0 ),       /* 0 */
+/* 252 */      NdrFcShort( 0x6 ),      /* 6 */
+/* 254 */      NdrFcShort( 0x10 ),     /* ia64 Stack size/offset = 16 */
+/* 256 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 258 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 260 */      0x44,           /* Oi2 Flags:  has return, has ext, */
+                       0x2,            /* 2 */
+/* 262 */      0xa,            /* 10 */
+                       0x1,            /* Ext Flags:  new corr desc, */
+/* 264 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 266 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 268 */      NdrFcShort( 0x0 ),      /* 0 */
+/* 270 */      NdrFcShort( 0x0 ),      /* 0 */
+
+       /* Parameter seconds */
+
+/* 272 */      NdrFcShort( 0x48 ),     /* Flags:  in, base type, */
+/* 274 */      NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 276 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+       /* Return value */
+
+/* 278 */      NdrFcShort( 0x70 ),     /* Flags:  out, return, base type, */
+/* 280 */      NdrFcShort( 0x8 ),      /* ia64 Stack size/offset = 8 */
+/* 282 */      0x8,            /* FC_LONG */
+                       0x0,            /* 0 */
+
+                       0x0
+        }
+    };
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+    {
+        0,
+        {
+                       NdrFcShort( 0x0 ),      /* 0 */
+/*  2 */
+                       0x11, 0xc,      /* FC_RP [alloced_on_stack] [simple_pointer] */
+/*  4 */       0x8,            /* FC_LONG */
+                       0x5c,           /* FC_PAD */
+/*  6 */
+                       0x1b,           /* FC_CARRAY */
+                       0x0,            /* 0 */
+/*  8 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 10 */       0x28,           /* Corr desc:  parameter, FC_LONG */
+                       0x0,            /*  */
+/* 12 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 14 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 16 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 18 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 20 */       NdrFcShort( 0x2 ),      /* Offset= 2 (22) */
+/* 22 */
+                       0x12, 0x8,      /* FC_UP [simple_pointer] */
+/* 24 */
+                       0x25,           /* FC_C_WSTRING */
+                       0x5c,           /* FC_PAD */
+/* 26 */
+                       0x11, 0x14,     /* FC_RP [alloced_on_stack] [pointer_deref] */
+/* 28 */       NdrFcShort( 0x2 ),      /* Offset= 2 (30) */
+/* 30 */
+                       0x12, 0x0,      /* FC_UP */
+/* 32 */       NdrFcShort( 0x2 ),      /* Offset= 2 (34) */
+/* 34 */
+                       0x2b,           /* FC_NON_ENCAPSULATED_UNION */
+                       0x6,            /* FC_SHORT */
+/* 36 */       0x26,           /* Corr desc:  parameter, FC_SHORT */
+                       0x0,            /*  */
+/* 38 */       NdrFcShort( 0x0 ),      /* ia64 Stack size/offset = 0 */
+/* 40 */       NdrFcShort( 0x1 ),      /* Corr flags:  early, */
+/* 42 */       NdrFcShort( 0x2 ),      /* Offset= 2 (44) */
+/* 44 */       NdrFcShort( 0x10 ),     /* 16 */
+/* 46 */       NdrFcShort( 0x7 ),      /* 7 */
+/* 48 */       NdrFcLong( 0x1 ),       /* 1 */
+/* 52 */       NdrFcShort( 0x28 ),     /* Offset= 40 (92) */
+/* 54 */       NdrFcLong( 0x2 ),       /* 2 */
+/* 58 */       NdrFcShort( 0x28 ),     /* Offset= 40 (98) */
+/* 60 */       NdrFcLong( 0x3 ),       /* 3 */
+/* 64 */       NdrFcShort( 0x28 ),     /* Offset= 40 (104) */
+/* 66 */       NdrFcLong( 0x4 ),       /* 4 */
+/* 70 */       NdrFcShort( 0x28 ),     /* Offset= 40 (110) */
+/* 72 */       NdrFcLong( 0x5 ),       /* 5 */
+/* 76 */       NdrFcShort( 0x28 ),     /* Offset= 40 (116) */
+/* 78 */       NdrFcLong( 0x6 ),       /* 6 */
+/* 82 */       NdrFcShort( 0x2a ),     /* Offset= 42 (124) */
+/* 84 */       NdrFcLong( 0x7 ),       /* 7 */
+/* 88 */       NdrFcShort( 0x2e ),     /* Offset= 46 (134) */
+/* 90 */       NdrFcShort( 0xffff ),   /* Offset= -1 (89) */
+/* 92 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 94 */       NdrFcShort( 0x1 ),      /* 1 */
+/* 96 */       0x2,            /* FC_CHAR */
+                       0x5b,           /* FC_END */
+/* 98 */
+                       0x15,           /* FC_STRUCT */
+                       0x1,            /* 1 */
+/* 100 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 102 */      0x6,            /* FC_SHORT */
+                       0x5b,           /* FC_END */
+/* 104 */
+                       0x15,           /* FC_STRUCT */
+                       0x3,            /* 3 */
+/* 106 */      NdrFcShort( 0x4 ),      /* 4 */
+/* 108 */      0x8,            /* FC_LONG */
+                       0x5b,           /* FC_END */
+/* 110 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 112 */      NdrFcShort( 0x8 ),      /* 8 */
+/* 114 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 116 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 118 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 120 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 122 */      0xb,            /* FC_HYPER */
+                       0x5b,           /* FC_END */
+/* 124 */
+                       0x15,           /* FC_STRUCT */
+                       0x0,            /* 0 */
+/* 126 */      NdrFcShort( 0x2 ),      /* 2 */
+/* 128 */      0x2,            /* FC_CHAR */
+                       0x4c,           /* FC_EMBEDDED_COMPLEX */
+/* 130 */      0x0,            /* 0 */
+                       NdrFcShort( 0xffd9 ),   /* Offset= -39 (92) */
+                       0x5b,           /* FC_END */
+/* 134 */
+                       0x15,           /* FC_STRUCT */
+                       0x7,            /* 7 */
+/* 136 */      NdrFcShort( 0x10 ),     /* 16 */
+/* 138 */      0x2,            /* FC_CHAR */
+                       0x43,           /* FC_STRUCTPAD7 */
+/* 140 */      0x4c,           /* FC_EMBEDDED_COMPLEX */
+                       0x0,            /* 0 */
+/* 142 */      NdrFcShort( 0xffe0 ),   /* Offset= -32 (110) */
+/* 144 */      0x5c,           /* FC_PAD */
+                       0x5b,           /* FC_END */
+
+                       0x0
+        }
+    };
+
+static const unsigned short rpcecho_FormatStringOffsetTable[] =
+    {
+    0,
+    44,
+    88,
+    126,
+    164,
+    202,
+    246
+    };
+
+
+static const MIDL_STUB_DESC rpcecho_StubDesc =
+    {
+    (void *)& rpcecho___RpcServerInterface,
+    MIDL_user_allocate,
+    MIDL_user_free,
+    0,
+    0,
+    0,
+    0,
+    0,
+    __MIDL_TypeFormatString.Format,
+    1, /* -error bounds_check flag */
+    0x50002, /* Ndr library version */
+    0,
+    0x6000169, /* MIDL Version 6.0.361 */
+    0,
+    0,
+    0,  /* notify & notify_flag routine table */
+    0x1, /* MIDL flag */
+    0, /* cs routines */
+    0,   /* proxy/server info */
+    0   /* Reserved5 */
+    };
+
+static RPC_DISPATCH_FUNCTION rpcecho_table[] =
+    {
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    NdrServerCall2,
+    0
+    };
+RPC_DISPATCH_TABLE rpcecho_v4_0_DispatchTable =
+    {
+    7,
+    rpcecho_table
+    };
+
+static const SERVER_ROUTINE rpcecho_ServerRoutineTable[] =
+    {
+    (SERVER_ROUTINE)AddOne,
+    (SERVER_ROUTINE)EchoData,
+    (SERVER_ROUTINE)SinkData,
+    (SERVER_ROUTINE)SourceData,
+    (SERVER_ROUTINE)TestCall,
+    (SERVER_ROUTINE)TestCall2,
+    (SERVER_ROUTINE)TestSleep
+    };
+
+static const MIDL_SERVER_INFO rpcecho_ServerInfo =
+    {
+    &rpcecho_StubDesc,
+    rpcecho_ServerRoutineTable,
+    __MIDL_ProcFormatString.Format,
+    rpcecho_FormatStringOffsetTable,
+    0,
+    0,
+    0,
+    0};
+#if _MSC_VER >= 1200
+#pragma warning(pop)
+#endif
+
+
+#endif /* defined(_M_IA64) || defined(_M_AMD64)*/
diff --git a/testprogs/win32/rpcecho-win32-pipe/server.c b/testprogs/win32/rpcecho-win32-pipe/server.c
new file mode 100755 (executable)
index 0000000..6567c64
--- /dev/null
@@ -0,0 +1,212 @@
+/*
+   RPC echo server.
+
+   Copyright (C) Tim Potter 2003
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#define _WIN32_WINNT 0x0500
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include "rpcecho.h"
+#include <NtDsApi.h>
+
+#define RPC_MIN_CALLS 1
+#define RPC_MAX_CALLS 20
+#define RPC_ENDPOINT "\\pipe\\rpcecho"
+
+void AddOne(int in_data, __RPC_FAR int *out_data)
+{
+       printf("AddOne: got in_data = %d\n", in_data);
+       *out_data = in_data + 1;
+}
+
+void EchoData(int len, unsigned char __RPC_FAR in_data[],
+       unsigned char __RPC_FAR out_data[])
+{
+       printf("EchoData: got len = %d\n", len);
+
+       memcpy(out_data, in_data, len);
+}
+
+void SinkData(int len, unsigned char __RPC_FAR in_data[  ])
+{
+       printf("SinkData: got len = %d\n", len);
+}
+
+void SourceData(int len, unsigned char __RPC_FAR out_data[  ])
+{
+       int i;
+
+       printf("SourceData: got len = %d\n", len);
+
+       for (i = 0; i < len; i++)
+               out_data[i] = i & 0xff;
+}
+
+void TestCall(wchar_t **s1, wchar_t **s2)
+{
+       if (*s1) {
+               printf("s1='%S'\n", *s1);
+       } else {
+               printf("s1=NULL\n");
+       }
+       *s2 = L"test string";
+}
+
+long TestCall2(short level, echo_Info **info)
+{
+       static echo_Info i;
+
+       printf("TestCall2 level %d\n", level);
+
+       *info = &i;
+
+       switch (level) {
+       case 1:
+               i.info1.v = 10;
+               break;
+       case 2:
+               i.info2.v = 20;
+               break;
+       case 3:
+               i.info3.v = 30;
+               break;
+       case 4:
+               i.info4.v = 40;
+               break;
+       case 5:
+               i.info5.v1 = 50;
+               i.info5.v2 = 51;
+               break;
+       case 6:
+               i.info6.v1 = 60;
+               i.info6.info1.v = 61;
+               break;
+       case 7:
+               i.info7.v1 = 70;
+               i.info7.info4.v = 71;
+               break;
+       default:
+               return -1;
+       }
+       return 0;
+}
+
+#if 0
+void TestSleep(PRPC_ASYNC_STATE pAsync, long seconds)
+{
+       long ret;
+       printf("async Sleeping for %d seconds\n", seconds);
+       Sleep(1000 * seconds);
+       ret = seconds;
+       RpcAsyncCompleteCall(pAsync, &ret);
+}
+#else
+long TestSleep(long seconds)
+{
+       printf("non-async Sleeping for %d seconds\n", seconds);
+       Sleep(1000 * seconds);
+       return seconds;
+}
+#endif
+
+void main(int argc, char **argv)
+{
+       RPC_STATUS status;
+       DWORD dwStatus;
+       RPC_BINDING_VECTOR *pBindingVector;
+#define SERVER_PRINC_LEN 1024
+       unsigned server_princ_len = SERVER_PRINC_LEN;
+       char server_princ[SERVER_PRINC_LEN];
+
+       if (argc != 1) {
+               printf("Usage: rpcechosrv\n");
+               exit(0);
+       }
+
+       status = RpcServerUseProtseqEp("ncacn_np", RPC_MAX_CALLS, "\\pipe\\rpcecho", NULL);
+       if (status) {
+               printf("Failed to register ncacn_np endpoint\n");
+               exit(status);
+       }
+
+       status = RpcServerUseProtseqEp("ncacn_ip_tcp", RPC_MAX_CALLS, "1234", NULL);
+       if (status) {
+               printf("Failed to register ncacn_ip_tcp endpoint\n");
+               exit(status);
+       }
+
+       status = RpcServerInqBindings(&pBindingVector);
+       if (status) {
+               printf("Failed RpcServerInqBindings\n");
+               exit(status);
+       }
+
+       status = RpcEpRegister(rpcecho_v4_0_s_ifspec, pBindingVector, NULL, "rpcecho server");
+       if (status) {
+               printf("Failed RpcEpRegister\n");
+               exit(status);
+       }
+
+       status = RpcServerRegisterIf(rpcecho_v4_0_s_ifspec, NULL, NULL);
+
+       if (status) {
+               printf("Failed to register interface\n");
+               exit(status);
+       }
+
+       dwStatus = DsMakeSpn("host",
+                            NULL,
+                            NULL,
+                            0,
+                            NULL,
+                            &server_princ_len,
+                            server_princ);
+       printf("server_princ: %s\n", server_princ);
+
+#ifdef RPC_C_AUTHN_GSS_NEGOTIATE
+       status = RpcServerRegisterAuthInfo(server_princ, RPC_C_AUTHN_GSS_NEGOTIATE, NULL, NULL);
+       if (status) {
+               printf("Failed to setup auth info: RPC_C_AUTHN_GSS_NEGOTIATE\n");
+       }
+#else
+       printf("Sorry auth info RPC_C_AUTHN_GSS_NEGOTIATE not compiled in\n");
+#endif
+
+       status = RpcServerRegisterAuthInfo(NULL, RPC_C_AUTHN_WINNT, NULL, NULL);
+       if (status) {
+               printf("Failed to setup auth info: RPC_C_AUTHN_WINNT\n");
+       }
+
+#ifdef RPC_C_AUTHN_GSS_KERBEROS
+       status = RpcServerRegisterAuthInfo(server_princ, RPC_C_AUTHN_GSS_KERBEROS, NULL, NULL);
+       if (status) {
+               printf("Failed to setup auth info: RPC_C_AUTHN_GSS_KERBEROS\n");
+       }
+#else
+       printf("Sorry auth info RPC_C_AUTHN_GSS_KERBEROS not compiled in\n");
+#endif
+
+       status = RpcServerListen(RPC_MIN_CALLS, RPC_MAX_CALLS, FALSE);
+
+       if (status) {
+               printf("RpcServerListen returned error %d\n", status);
+               exit(status);
+       }
+}
diff --git a/testprogs/win32/rpcecho-win32-pipe/server.c.bak b/testprogs/win32/rpcecho-win32-pipe/server.c.bak
new file mode 100755 (executable)
index 0000000..5a0175c
--- /dev/null
@@ -0,0 +1,212 @@
+/*
+   RPC echo server.
+
+   Copyright (C) Tim Potter 2003
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#define _WIN32_WINNT 0x0500
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include "rpcecho.h"
+#include <NtDsApi.h>
+
+#define RPC_MIN_CALLS 1
+#define RPC_MAX_CALLS 20
+#define RPC_ENDPOINT "\\pipe\\rpcecho"
+
+void AddOne(int in_data, __RPC_FAR int *out_data)
+{
+       printf("AddOne: got in_data = %d\n", in_data);
+       *out_data = in_data + 1;
+}
+
+void EchoData(int len, unsigned char __RPC_FAR in_data[],
+       unsigned char __RPC_FAR out_data[])
+{
+       printf("EchoData: got len = %d\n", len);
+
+       memcpy(out_data, in_data, len);
+}
+
+void SinkData(int len, unsigned char __RPC_FAR in_data[  ])
+{
+       printf("SinkData: got len = %d\n", len);
+}
+
+void SourceData(int len, unsigned char __RPC_FAR out_data[  ])
+{
+       int i;
+
+       printf("SourceData: got len = %d\n", len);
+
+       for (i = 0; i < len; i++)
+               out_data[i] = i & 0xff;
+}
+
+void TestCall(wchar_t **s1, wchar_t **s2)
+{
+       if (*s1) {
+               printf("s1='%S'\n", *s1);
+       } else {
+               printf("s1=NULL\n");
+       }
+       *s2 = L"test string";
+}
+
+long TestCall2(short level, echo_Info **info)
+{
+       static echo_Info i;
+
+       printf("TestCall2 level %d\n", level);
+
+       *info = &i;
+
+       switch (level) {
+       case 1:
+               i.info1.v = 10;
+               break;
+       case 2:
+               i.info2.v = 20;
+               break;
+       case 3:
+               i.info3.v = 30;
+               break;
+       case 4:
+               i.info4.v = 40;
+               break;
+       case 5:
+               i.info5.v1 = 50;
+               i.info5.v2 = 51;
+               break;
+       case 6:
+               i.info6.v1 = 60;
+               i.info6.info1.v = 61;
+               break;
+       case 7:
+               i.info7.v1 = 70;
+               i.info7.info4.v = 71;
+               break;
+       default:
+               return -1;
+       }
+       return 0;
+}
+
+#if 0
+void TestSleep(PRPC_ASYNC_STATE pAsync, long seconds)
+{
+       long ret;
+       printf("async Sleeping for %d seconds\n", seconds);
+       Sleep(1000 * seconds);
+       ret = seconds;
+       RpcAsyncCompleteCall(pAsync, &ret);
+}
+#else
+long TestSleep(long seconds)
+{
+       printf("non-async Sleeping for %d seconds\n", seconds);
+       Sleep(1000 * seconds);
+       return seconds;
+}
+#endif
+
+void main(int argc, char **argv)
+{
+       RPC_STATUS status;
+       DWORD dwStatus;
+       RPC_BINDING_VECTOR *pBindingVector;
+#define SERVER_PRINC_LEN 1024
+       unsigned server_princ_len = SERVER_PRINC_LEN;
+       char server_princ[SERVER_PRINC_LEN];
+
+       if (argc != 1) {
+               printf("Usage: rpcechosrv\n");
+               exit(0);
+       }
+
+       status = RpcServerUseProtseqEp("ncacn_np", RPC_MAX_CALLS, "\\pipe\\rpcecho", NULL);
+       if (status) {
+               printf("Failed to register ncacn_np endpoint\n");
+               exit(status);
+       }
+
+       status = RpcServerUseProtseqEp("ncacn_ip_tcp", RPC_MAX_CALLS, "1234", NULL);
+       if (status) {
+               printf("Failed to register ncacn_ip_tcp endpoint\n");
+               exit(status);
+       }
+
+       status = RpcServerInqBindings(&pBindingVector);
+       if (status) {
+               printf("Failed RpcServerInqBindings\n");
+               exit(status);
+       }
+
+       status = RpcEpRegister(rpcecho_v1_0_s_ifspec, pBindingVector, NULL, "rpcecho server");
+       if (status) {
+               printf("Failed RpcEpRegister\n");
+               exit(status);
+       }
+
+       status = RpcServerRegisterIf(rpcecho_v1_0_s_ifspec, NULL, NULL);
+
+       if (status) {
+               printf("Failed to register interface\n");
+               exit(status);
+       }
+
+       dwStatus = DsMakeSpn("host",
+                            NULL,
+                            NULL,
+                            0,
+                            NULL,
+                            &server_princ_len,
+                            server_princ);
+       printf("server_princ: %s\n", server_princ);
+
+#ifdef RPC_C_AUTHN_GSS_NEGOTIATE
+       status = RpcServerRegisterAuthInfo(server_princ, RPC_C_AUTHN_GSS_NEGOTIATE, NULL, NULL);
+       if (status) {
+               printf("Failed to setup auth info: RPC_C_AUTHN_GSS_NEGOTIATE\n");
+       }
+#else
+       printf("Sorry auth info RPC_C_AUTHN_GSS_NEGOTIATE not compiled in\n");
+#endif
+
+       status = RpcServerRegisterAuthInfo(NULL, RPC_C_AUTHN_WINNT, NULL, NULL);
+       if (status) {
+               printf("Failed to setup auth info: RPC_C_AUTHN_WINNT\n");
+       }
+
+#ifdef RPC_C_AUTHN_GSS_KERBEROS
+       status = RpcServerRegisterAuthInfo(server_princ, RPC_C_AUTHN_GSS_KERBEROS, NULL, NULL);
+       if (status) {
+               printf("Failed to setup auth info: RPC_C_AUTHN_GSS_KERBEROS\n");
+       }
+#else
+       printf("Sorry auth info RPC_C_AUTHN_GSS_KERBEROS not compiled in\n");
+#endif
+
+       status = RpcServerListen(RPC_MIN_CALLS, RPC_MAX_CALLS, FALSE);
+
+       if (status) {
+               printf("RpcServerListen returned error %d\n", status);
+               exit(status);
+       }
+}
diff --git a/testprogs/win32/rpcecho-win32-pipe/utils.c b/testprogs/win32/rpcecho-win32-pipe/utils.c
new file mode 100755 (executable)
index 0000000..3930a78
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+   RPC echo utility functions.
+
+   Copyright (C) Tim Potter 2003
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "rpcecho.h"
+
+/* MIDL allocate and free functions */
+
+void __RPC_FAR *__RPC_USER midl_user_allocate(size_t len)
+{
+               return(malloc(len));
+}
+
+void __RPC_USER midl_user_free(void __RPC_FAR *ptr)
+{
+       free(ptr);
+}