2 * Tests for WIDL and RPC server/clients.
4 * Copyright (C) Google 2007 (Dan Hipschman)
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/test.h"
24 #include "server_defines.h"
31 #define PIPE "\\pipe\\wine_rpcrt4_test"
35 static const char *progname;
37 static HANDLE stop_event;
39 void __RPC_FAR *__RPC_USER
40 midl_user_allocate(size_t n)
46 midl_user_free(void __RPC_FAR *p)
52 xstrdup(const char *s)
54 char *d = HeapAlloc(GetProcessHeap(), 0, strlen(s) + 1);
78 s_square_out(int x, int *y)
90 s_str_length(const char *s)
96 s_cstr_length(const char *s, int n)
99 while (0 < n-- && *s++)
105 s_dot_self(vector_t *v)
107 return s_square(v->x) + s_square(v->y) + s_square(v->z);
111 s_square_half(double x, double *y)
118 s_square_half_float(float x, float *y)
125 s_square_half_long(long x, long *y)
132 s_sum_fixed_array(int a[5])
134 return a[0] + a[1] + a[2] + a[3] + a[4];
138 s_pints_sum(pints_t *pints)
140 return *pints->pi + **pints->ppi + ***pints->pppi;
144 s_ptypes_sum(ptypes_t *pt)
146 return *pt->pc + *pt->ps + *pt->pl + *pt->pf + *pt->pd;
150 s_dot_pvectors(pvectors_t *p)
152 return p->pu->x * (*p->pv)->x + p->pu->y * (*p->pv)->y + p->pu->z * (*p->pv)->z;
158 return sp->x + sp->s->x;
162 s_square_sun(sun_t *su)
166 case SUN_I: return su->u.i * su->u.i;
168 case SUN_F2: return su->u.f * su->u.f;
169 case SUN_PI: return (*su->u.pi) * (*su->u.pi);
176 s_test_list_length(test_list_t *list)
178 return (list->t == TL_LIST
179 ? 1 + s_test_list_length(list->u.tail)
184 s_sum_fixed_int_3d(int m[2][3][4])
189 for (i = 0; i < 2; ++i)
190 for (j = 0; j < 3; ++j)
191 for (k = 0; k < 4; ++k)
198 s_sum_conf_array(int x[], int n)
200 int *p = x, *end = p + n;
210 s_sum_unique_conf_array(int x[], int n)
212 return s_sum_conf_array(x, n);
216 s_sum_unique_conf_ptr(int *x, int n)
218 return x ? s_sum_conf_array(x, n) : 0;
222 s_sum_var_array(int x[20], int n)
224 ok(0 <= n, "RPC sum_var_array\n");
225 ok(n <= 20, "RPC sum_var_array\n");
227 return s_sum_conf_array(x, n);
231 s_dot_two_vectors(vector_t vs[2])
233 return vs[0].x * vs[1].x + vs[0].y * vs[1].y + vs[0].z * vs[1].z;
239 return s_sum_conf_array(cs->ca, cs->n);
243 s_sum_cps(cps_t *cps)
248 for (i = 0; i < *cps->pn; ++i)
251 for (i = 0; i < 2 * cps->n; ++i)
258 s_sum_cpsc(cpsc_t *cpsc)
262 for (i = 0; i < (cpsc->c ? cpsc->a : cpsc->b); ++i)
268 s_square_puint(puint_t p)
275 s_sum_puints(puints_t *p)
279 for (i = 0; i < p->n; ++i)
280 sum += atoi(p->ps[i]);
285 s_sum_cpuints(cpuints_t *p)
289 for (i = 0; i < p->n; ++i)
290 sum += atoi(p->ps[i]);
295 s_dot_copy_vectors(vector_t u, vector_t v)
297 return u.x * v.x + u.y * v.y + u.z * v.z;
301 s_square_test_us(test_us_t *tus)
303 int n = atoi(tus->us.x);
308 s_square_encu(encu_t *eu)
312 case ENCU_I: return eu->tagged_union.i * eu->tagged_union.i;
313 case ENCU_F: return eu->tagged_union.f * eu->tagged_union.f;
320 s_sum_parr(int *a[3])
322 return s_sum_pcarr(a, 3);
326 s_sum_pcarr(int *a[], int n)
329 for (i = 0; i < n; ++i)
349 s_square_encue(encue_t *eue)
353 case E1: return eue->tagged_union.i1 * eue->tagged_union.i1;
354 case E2: return eue->tagged_union.f2 * eue->tagged_union.f2;
361 s_sum_toplev_conf_2n(int *x, int n)
365 for (i = 0; i < 2 * n; ++i)
371 s_sum_toplev_conf_cond(int *x, int a, int b, int c)
376 for (i = 0; i < n; ++i)
382 s_sum_aligns(aligns_t *a)
384 return a->c + a->i + a->s + a->d;
388 s_sum_padded(padded_t *p)
394 s_sum_padded2(padded_t ps[2])
396 return s_sum_padded(&ps[0]) + s_sum_padded(&ps[1]);
400 s_sum_padded_conf(padded_t *ps, int n)
404 for (i = 0; i < n; ++i)
405 sum += s_sum_padded(&ps[i]);
410 s_sum_bogus(bogus_t *b)
412 return *b->h.p1 + *b->p2 + *b->p3 + b->c;
416 s_check_null(int *null)
418 ok(!null, "RPC check_null\n");
422 s_str_struct_len(str_struct_t *s)
424 return lstrlenA(s->s);
428 s_wstr_struct_len(wstr_struct_t *s)
430 return lstrlenW(s->s);
434 s_sum_doub_carr(doub_carr_t *dc)
438 for (i = 0; i < dc->n; ++i)
439 for (j = 0; j < dc->a[i]->n; ++j)
440 sum += dc->a[i]->a[j];
445 s_make_pyramid_doub_carr(unsigned char n, doub_carr_t **dc)
449 t = MIDL_user_allocate(FIELD_OFFSET(doub_carr_t, a[n]));
451 for (i = 0; i < n; ++i)
454 t->a[i] = MIDL_user_allocate(FIELD_OFFSET(doub_carr_1_t, a[v]));
456 for (j = 0; j < v; ++j)
457 t->a[i]->a[j] = j + 1;
463 s_hash_bstr(bstr_t b)
469 for (i = 0; i < n; ++i)
470 hash = 5 * hash + (unsigned) s[i];
475 s_get_name(name_t *name)
477 const char bossman[] = "Jeremy White";
478 memcpy(name->name, bossman, min(name->size, sizeof(bossman)));
479 /* ensure nul-termination */
480 if (name->size < sizeof(bossman))
481 name->name[name->size - 1] = 0;
487 ok(RPC_S_OK == RpcMgmtStopServerListening(NULL), "RpcMgmtStopServerListening\n");
488 ok(RPC_S_OK == RpcServerUnregisterIf(NULL, NULL, FALSE), "RpcServerUnregisterIf\n");
489 ok(SetEvent(stop_event), "SetEvent\n");
493 make_cmdline(char buffer[MAX_PATH], const char *test)
495 sprintf(buffer, "%s server %s", progname, test);
499 run_client(const char *test)
501 char cmdline[MAX_PATH];
502 PROCESS_INFORMATION info;
503 STARTUPINFOA startup;
506 memset(&startup, 0, sizeof startup);
507 startup.cb = sizeof startup;
509 make_cmdline(cmdline, test);
510 ok(CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n");
511 ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
512 ok(GetExitCodeProcess(info.hProcess, &exitcode), "GetExitCodeProcess\n");
513 ok(CloseHandle(info.hProcess), "CloseHandle\n");
514 ok(CloseHandle(info.hThread), "CloseHandle\n");
516 return exitcode == 0;
522 char string[] = "I am a string";
523 WCHAR wstring[] = {'I',' ','a','m',' ','a',' ','w','s','t','r','i','n','g', 0};
524 int f[5] = {1, 3, 0, -2, -4};
525 vector_t a = {1, 3, 7};
526 vector_t vec1 = {4, -2, 1}, vec2 = {-5, 2, 3}, *pvec2 = &vec2;
527 pvectors_t pvecs = {&vec1, &pvec2};
528 sp_inner_t spi = {42};
529 sp_t sp = {-13, &spi};
530 aligns_t aligns = {3, 4, 5, 6.0};
536 int i1, i2, i3, *pi2, *pi3, **ppi3;
543 str_struct_t ss = {string};
544 wstr_struct_t ws = {wstring};
546 ok(int_return() == INT_CODE, "RPC int_return\n");
548 ok(square(7) == 49, "RPC square\n");
549 ok(sum(23, -4) == 19, "RPC sum\n");
553 ok(x == 121, "RPC square_out\n");
557 ok(x == 25, "RPC square_ref\n");
559 ok(str_length(string) == strlen(string), "RPC str_length\n");
560 ok(dot_self(&a) == 59, "RPC dot_self\n");
562 ok(str_struct_len(&ss) == lstrlenA(string), "RPC str_struct_len\n");
563 ok(wstr_struct_len(&ws) == lstrlenW(wstring), "RPC str_struct_len\n");
566 u = square_half(3.0, &v);
567 ok(u == 9.0, "RPC square_half\n");
568 ok(v == 1.5, "RPC square_half\n");
571 s = square_half_float(3.0f, &t);
572 ok(s == 9.0f, "RPC square_half_float\n");
573 ok(t == 1.5f, "RPC square_half_float\n");
576 q = square_half_long(3, &r);
577 ok(q == 9, "RPC square_half_long\n");
578 ok(r == 1, "RPC square_half_long\n");
589 ok(pints_sum(&pints) == -13, "RPC pints_sum\n");
601 ok(ptypes_sum(&ptypes) == 33.0, "RPC ptypes_sum\n");
603 ok(dot_pvectors(&pvecs) == -21, "RPC dot_pvectors\n");
604 ok(dot_copy_vectors(vec1, vec2) == -21, "RPC dot_copy_vectors\n");
605 ok(sum_fixed_array(f) == -2, "RPC sum_fixed_array\n");
606 ok(sum_sp(&sp) == 29, "RPC sum_sp\n");
608 ok(enum_ord(E1) == 1, "RPC enum_ord\n");
609 ok(enum_ord(E2) == 2, "RPC enum_ord\n");
610 ok(enum_ord(E3) == 3, "RPC enum_ord\n");
611 ok(enum_ord(E4) == 4, "RPC enum_ord\n");
613 ok(sum_aligns(&aligns) == 18.0, "RPC sum_aligns\n");
617 ok(sum_padded(&padded) == 5, "RPC sum_padded\n");
622 ok(sum_padded2(padded2) == 6, "RPC sum_padded2\n");
627 ok(sum_padded_conf(padded2, 2) == 6, "RPC sum_padded_conf\n");
636 ok(sum_bogus(&bogus) == 12, "RPC sum_bogus\n");
651 ok(square_sun(&su) == 81.0, "RPC square_sun\n");
655 ok(square_sun(&su) == 25.0, "RPC square_sun\n");
659 ok(square_sun(&su) == 4.0, "RPC square_sun\n");
664 ok(square_sun(&su) == 121.0, "RPC square_sun\n");
667 eu.tagged_union.i = 7;
668 ok(square_encu(&eu) == 49.0, "RPC square_encu\n");
671 eu.tagged_union.f = 3.0;
672 ok(square_encu(&eu) == 9.0, "RPC square_encu\n");
675 eue.tagged_union.i1 = 8;
676 ok(square_encue(&eue) == 64.0, "RPC square_encue\n");
679 eue.tagged_union.f2 = 10.0;
680 ok(square_encue(&eue) == 100.0, "RPC square_encue\n");
686 test_list_t *n = HeapAlloc(GetProcessHeap(), 0, sizeof *n);
692 make_list(test_list_t *tail)
694 test_list_t *n = HeapAlloc(GetProcessHeap(), 0, sizeof *n);
701 free_list(test_list_t *list)
703 if (list->t == TL_LIST)
704 free_list(list->u.tail);
705 HeapFree(GetProcessHeap(), 0, list);
709 puint_t_UserSize(ULONG *flags, ULONG start, puint_t *p)
711 return start + sizeof(int);
714 unsigned char * __RPC_USER
715 puint_t_UserMarshal(ULONG *flags, unsigned char *buffer, puint_t *p)
718 memcpy(buffer, &n, sizeof n);
719 return buffer + sizeof n;
722 unsigned char * __RPC_USER
723 puint_t_UserUnmarshal(ULONG *flags, unsigned char *buffer, puint_t *p)
726 memcpy(&n, buffer, sizeof n);
727 *p = HeapAlloc(GetProcessHeap(), 0, 10);
728 sprintf(*p, "%d", n);
729 return buffer + sizeof n;
733 puint_t_UserFree(ULONG *flags, puint_t *p)
735 HeapFree(GetProcessHeap(), 0, *p);
739 us_t_UserSize(ULONG *flags, ULONG start, us_t *pus)
741 return start + sizeof(struct wire_us);
744 unsigned char * __RPC_USER
745 us_t_UserMarshal(ULONG *flags, unsigned char *buffer, us_t *pus)
748 wus.x = atoi(pus->x);
749 memcpy(buffer, &wus, sizeof wus);
750 return buffer + sizeof wus;
753 unsigned char * __RPC_USER
754 us_t_UserUnmarshal(ULONG *flags, unsigned char *buffer, us_t *pus)
757 memcpy(&wus, buffer, sizeof wus);
758 pus->x = HeapAlloc(GetProcessHeap(), 0, 10);
759 sprintf(pus->x, "%d", wus.x);
760 return buffer + sizeof wus;
764 us_t_UserFree(ULONG *flags, us_t *pus)
766 HeapFree(GetProcessHeap(), 0, pus->x);
770 bstr_t_UserSize(ULONG *flags, ULONG start, bstr_t *b)
772 return start + FIELD_OFFSET(wire_bstr_t, data[(*b)[-1]]);
775 unsigned char * __RPC_USER
776 bstr_t_UserMarshal(ULONG *flags, unsigned char *buffer, bstr_t *b)
778 wire_bstr_t *wb = (wire_bstr_t *) buffer;
780 memcpy(&wb->data, *b, wb->n * sizeof wb->data[0]);
781 return buffer + FIELD_OFFSET(wire_bstr_t, data[wb->n]);
784 unsigned char * __RPC_USER
785 bstr_t_UserUnmarshal(ULONG *flags, unsigned char *buffer, bstr_t *b)
787 wire_bstr_t *wb = (wire_bstr_t *) buffer;
788 short *data = HeapAlloc(GetProcessHeap(), 0, (wb->n + 1) * sizeof *data);
790 memcpy(&data[1], wb->data, wb->n * sizeof data[1]);
792 return buffer + FIELD_OFFSET(wire_bstr_t, data[wb->n]);
796 bstr_t_UserFree(ULONG *flags, bstr_t *b)
798 HeapFree(GetProcessHeap(), 0, &((*b)[-1]));
804 int a[] = {1, 2, 3, 4};
806 test_list_t *list = make_list(make_list(make_list(null_list())));
807 test_us_t tus = {{p1}};
811 short bstr_data[] = { 5, 'H', 'e', 'l', 'l', 'o' };
812 bstr_t bstr = &bstr_data[1];
816 ok(test_list_length(list) == 3, "RPC test_list_length\n");
817 ok(square_puint(p1) == 121, "RPC square_puint\n");
819 pus.ps = HeapAlloc(GetProcessHeap(), 0, pus.n * sizeof pus.ps[0]);
820 pus.ps[0] = xstrdup("5");
821 pus.ps[1] = xstrdup("6");
822 pus.ps[2] = xstrdup("7");
823 pus.ps[3] = xstrdup("8");
824 ok(sum_puints(&pus) == 26, "RPC sum_puints\n");
825 HeapFree(GetProcessHeap(), 0, pus.ps[0]);
826 HeapFree(GetProcessHeap(), 0, pus.ps[1]);
827 HeapFree(GetProcessHeap(), 0, pus.ps[2]);
828 HeapFree(GetProcessHeap(), 0, pus.ps[3]);
829 HeapFree(GetProcessHeap(), 0, pus.ps);
831 cpus.ps = HeapAlloc(GetProcessHeap(), 0, cpus.n * sizeof cpus.ps[0]);
832 cpus.ps[0] = xstrdup("5");
833 cpus.ps[1] = xstrdup("6");
834 cpus.ps[2] = xstrdup("7");
835 cpus.ps[3] = xstrdup("8");
836 ok(sum_cpuints(&cpus) == 26, "RPC sum_puints\n");
837 HeapFree(GetProcessHeap(), 0, cpus.ps[0]);
838 HeapFree(GetProcessHeap(), 0, cpus.ps[1]);
839 HeapFree(GetProcessHeap(), 0, cpus.ps[2]);
840 HeapFree(GetProcessHeap(), 0, cpus.ps[3]);
841 HeapFree(GetProcessHeap(), 0, cpus.ps);
842 ok(square_test_us(&tus) == 121, "RPC square_test_us\n");
847 ok(sum_parr(pa) == 6, "RPC sum_parr\n");
853 ok(sum_pcarr(pa, 4) == 10, "RPC sum_pcarr\n");
855 ok(hash_bstr(bstr) == s_hash_bstr(bstr), "RPC hash_bstr_data\n");
860 name.name = buffer = HeapAlloc(GetProcessHeap(), 0, name.size);
863 ok(name.name == buffer, "[in,out] pointer should have stayed as %p but instead changed to %p\n", name.name, buffer);
864 HeapFree(GetProcessHeap(), 0, name.name);
868 check_pyramid_doub_carr(doub_carr_t *dc)
871 for (i = 0; i < dc->n; ++i)
872 for (j = 0; j < dc->a[i]->n; ++j)
873 if (dc->a[i]->a[j] != j + 1)
879 free_pyramid_doub_carr(doub_carr_t *dc)
882 for (i = 0; i < dc->n; ++i)
883 MIDL_user_free(dc->a[i]);
890 const char str1[25] = "Hello";
893 {{1, 2, 3, 4}, {-1, -3, -5, -7}, {0, 2, 4, 6}},
894 {{1, -2, 3, -4}, {2, 3, 5, 7}, {-4, -1, -14, 4114}}
896 int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
897 vector_t vs[2] = {{1, -2, 3}, {4, -5, -6}};
902 int ca[5] = {1, -2, 3, -4, 5};
905 ok(cstr_length(str1, sizeof str1) == strlen(str1), "RPC cstr_length\n");
907 ok(sum_fixed_int_3d(m) == 4116, "RPC sum_fixed_int_3d\n");
909 ok(sum_conf_array(c, 10) == 45, "RPC sum_conf_array\n");
910 ok(sum_conf_array(&c[5], 2) == 11, "RPC sum_conf_array\n");
911 ok(sum_conf_array(&c[7], 1) == 7, "RPC sum_conf_array\n");
912 ok(sum_conf_array(&c[2], 0) == 0, "RPC sum_conf_array\n");
914 ok(sum_unique_conf_array(ca, 4) == -2, "RPC sum_unique_conf_array\n");
915 ok(sum_unique_conf_ptr(ca, 5) == 3, "RPC sum_unique_conf_array\n");
916 ok(sum_unique_conf_ptr(NULL, 10) == 0, "RPC sum_unique_conf_array\n");
918 ok(sum_var_array(c, 10) == 45, "RPC sum_conf_array\n");
919 ok(sum_var_array(&c[5], 2) == 11, "RPC sum_conf_array\n");
920 ok(sum_var_array(&c[7], 1) == 7, "RPC sum_conf_array\n");
921 ok(sum_var_array(&c[2], 0) == 0, "RPC sum_conf_array\n");
923 ok(dot_two_vectors(vs) == -4, "RPC dot_two_vectors\n");
924 cs = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(cs_t, ca[5]));
931 ok(sum_cs(cs) == 1, "RPC sum_cs\n");
932 HeapFree(GetProcessHeap(), 0, cs);
939 ok(sum_cps(&cps) == 53, "RPC sum_cps\n");
945 ok(sum_cpsc(&cpsc) == 6, "RPC sum_cpsc\n");
950 ok(sum_cpsc(&cpsc) == 10, "RPC sum_cpsc\n");
952 ok(sum_toplev_conf_2n(c, 3) == 15, "RPC sum_toplev_conf_2n\n");
953 ok(sum_toplev_conf_cond(c, 5, 6, 1) == 10, "RPC sum_toplev_conf_cond\n");
954 ok(sum_toplev_conf_cond(c, 5, 6, 0) == 15, "RPC sum_toplev_conf_cond\n");
956 dc = malloc(FIELD_OFFSET(doub_carr_t, a[2]));
958 dc->a[0] = malloc(FIELD_OFFSET(doub_carr_1_t, a[3]));
963 dc->a[1] = malloc(FIELD_OFFSET(doub_carr_1_t, a[2]));
967 ok(sum_doub_carr(dc) == 19, "RPC sum_doub_carr\n");
973 make_pyramid_doub_carr(4, &dc);
974 ok(check_pyramid_doub_carr(dc), "RPC make_pyramid_doub_carr\n");
975 free_pyramid_doub_carr(dc);
988 client(const char *test)
990 if (strcmp(test, "tcp_basic") == 0)
992 static unsigned char iptcp[] = "ncacn_ip_tcp";
993 static unsigned char address[] = "127.0.0.1";
994 static unsigned char port[] = PORT;
995 unsigned char *binding;
997 ok(RPC_S_OK == RpcStringBindingCompose(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n");
998 ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
1002 ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n");
1003 ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
1005 else if (strcmp(test, "np_basic") == 0)
1007 static unsigned char np[] = "ncacn_np";
1008 static unsigned char address[] = "\\\\.";
1009 static unsigned char pipe[] = PIPE;
1010 unsigned char *binding;
1012 ok(RPC_S_OK == RpcStringBindingCompose(NULL, np, address, pipe, NULL, &binding), "RpcStringBindingCompose\n");
1013 ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
1018 ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n");
1019 ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
1026 static unsigned char iptcp[] = "ncacn_ip_tcp";
1027 static unsigned char port[] = PORT;
1028 static unsigned char np[] = "ncacn_np";
1029 static unsigned char pipe[] = PIPE;
1031 ok(RPC_S_OK == RpcServerUseProtseqEp(iptcp, 20, port, NULL), "RpcServerUseProtseqEp\n");
1032 ok(RPC_S_OK == RpcServerRegisterIf(s_IServer_v0_0_s_ifspec, NULL, NULL), "RpcServerRegisterIf\n");
1033 ok(RPC_S_OK == RpcServerListen(1, 20, TRUE), "RpcServerListen\n");
1035 stop_event = CreateEvent(NULL, FALSE, FALSE, NULL);
1036 ok(stop_event != NULL, "CreateEvent failed\n");
1038 ok(run_client("tcp_basic"), "tcp_basic client test failed\n");
1040 ok(RPC_S_OK == RpcServerUseProtseqEp(np, 0, pipe, NULL), "RpcServerUseProtseqEp\n");
1041 ok(run_client("np_basic"), "np_basic client test failed\n");
1043 ok(WAIT_OBJECT_0 == WaitForSingleObject(stop_event, 60000), "WaitForSingleObject\n");
1045 ok(RPC_S_OK == RpcMgmtWaitServerListen(), "RpcMgmtWaitServerListening\n");
1054 argc = winetest_get_mainargs(&argv);
1065 trace("Exception %d\n", RpcExceptionCode());