push b0b97fcd59eff07f047585692fa36859b459324f
[wine/hacks.git] / dlls / rpcrt4 / tests / rpc.c
blobbcd6a65107c6706088d838c9c1e479b78a4388a1
1 /*
2 * Unit test suite for rpc functions
4 * Copyright 2002 Greg Turner
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
21 #include <stdarg.h>
22 #include <stdio.h>
24 #include <ntstatus.h>
25 #define WIN32_NO_STATUS
26 #include "wine/test.h"
27 #include <windef.h>
28 #include <winbase.h>
29 #include <winnt.h>
30 #include <winerror.h>
32 #include "rpc.h"
33 #include "rpcdce.h"
35 typedef unsigned int unsigned32;
36 typedef struct twr_t
38 unsigned32 tower_length;
39 /* [size_is] */ byte tower_octet_string[ 1 ];
40 } twr_t;
42 RPC_STATUS WINAPI TowerExplode(const twr_t *tower, RPC_SYNTAX_IDENTIFIER *object, RPC_SYNTAX_IDENTIFIER *syntax, char **protseq, char **endpoint, char **address);
43 RPC_STATUS WINAPI TowerConstruct(const RPC_SYNTAX_IDENTIFIER *object, const RPC_SYNTAX_IDENTIFIER *syntax, const char *protseq, const char *endpoint, const char *address, twr_t **tower);
45 static UUID Uuid_Table[10] = {
46 { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, /* 0 (null) */
47 { 0xdeadbeef, 0xdead, 0xbeef, {0x10, 0x21, 0x35, 0x56, 0x89, 0xa0, 0xf4, 0x8a} }, /* 1 */
48 { 0xabadfeed, 0x49ff, 0xbead, {0x8a, 0xf4, 0xa0, 0x89, 0x56, 0x35, 0x21, 0x10} }, /* 2 */
49 { 0x93da375c, 0x1324, 0x1355, {0x87, 0xff, 0x49, 0x44, 0x34, 0x44, 0x22, 0x19} }, /* 3 */
50 { 0xdeadbeef, 0xdead, 0xbeef, {0x10, 0x21, 0x35, 0x56, 0x89, 0xa0, 0xf4, 0x8b} }, /* 4 (~1) */
51 { 0x9badfeed, 0x49ff, 0xbead, {0x8a, 0xf4, 0xa0, 0x89, 0x56, 0x35, 0x21, 0x10} }, /* 5 (~2) */
52 { 0x00000000, 0x0001, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, /* 6 (~0) */
53 { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01} }, /* 7 (~0) */
54 { 0x12312312, 0x1231, 0x1231, {0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xff} }, /* 8 */
55 { 0x11111111, 0x1111, 0x1111, {0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11} } /* 9 */
58 /* index of "10" means "NULL" */
59 static BOOL Uuid_Comparison_Grid[11][11] = {
60 { TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE },
61 { FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
62 { FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
63 { FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
64 { FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
65 { FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE },
66 { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE },
67 { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
68 { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE },
69 { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE },
70 { TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }
73 static void UuidConversionAndComparison(void) {
74 CHAR strx[100], x;
75 LPSTR str = strx;
76 WCHAR wstrx[100], wx;
77 LPWSTR wstr = wstrx;
79 UUID Uuid1, Uuid2, *PUuid1, *PUuid2;
80 RPC_STATUS rslt;
82 int i1,i2;
84 /* Uuid Equality */
85 for (i1 = 0; i1 < 11; i1++)
86 for (i2 = 0; i2 < 11; i2++) {
87 if (i1 < 10) {
88 Uuid1 = Uuid_Table[i1];
89 PUuid1 = &Uuid1;
90 } else {
91 PUuid1 = NULL;
93 if (i2 < 10) {
94 Uuid2 = Uuid_Table[i2];
95 PUuid2 = &Uuid2;
96 } else {
97 PUuid2 = NULL;
99 ok( (UuidEqual(PUuid1, PUuid2, &rslt) == Uuid_Comparison_Grid[i1][i2]), "UUID Equality\n" );
102 /* Uuid to String to Uuid (char) */
103 for (i1 = 0; i1 < 10; i1++) {
104 Uuid1 = Uuid_Table[i1];
105 ok( (UuidToStringA(&Uuid1, (unsigned char**)&str) == RPC_S_OK), "Simple UUID->String copy\n" );
106 ok( (UuidFromStringA((unsigned char*)str, &Uuid2) == RPC_S_OK), "Simple String->UUID copy from generated UUID String\n" );
107 ok( UuidEqual(&Uuid1, &Uuid2, &rslt), "Uuid -> String -> Uuid transform\n" );
108 /* invalid uuid tests -- size of valid UUID string=36 */
109 for (i2 = 0; i2 < 36; i2++) {
110 x = str[i2];
111 str[i2] = 'g'; /* whatever, but "g" is a good boundary condition */
112 ok( (UuidFromStringA((unsigned char*)str, &Uuid1) == RPC_S_INVALID_STRING_UUID), "Invalid UUID String\n" );
113 str[i2] = x; /* change it back so remaining tests are interesting. */
115 RpcStringFree((unsigned char **)&str);
118 /* Uuid to String to Uuid (wchar) */
119 for (i1 = 0; i1 < 10; i1++) {
120 Uuid1 = Uuid_Table[i1];
121 rslt=UuidToStringW(&Uuid1, &wstr);
122 if (rslt==RPC_S_CANNOT_SUPPORT) {
123 /* Must be Win9x (no Unicode support), skip the tests */
124 break;
126 ok( (rslt == RPC_S_OK), "Simple UUID->WString copy\n" );
127 ok( (UuidFromStringW(wstr, &Uuid2) == RPC_S_OK), "Simple WString->UUID copy from generated UUID String\n" );
128 ok( UuidEqual(&Uuid1, &Uuid2, &rslt), "Uuid -> WString -> Uuid transform\n" );
129 /* invalid uuid tests -- size of valid UUID string=36 */
130 for (i2 = 0; i2 < 36; i2++) {
131 wx = wstr[i2];
132 wstr[i2] = 'g'; /* whatever, but "g" is a good boundary condition */
133 ok( (UuidFromStringW(wstr, &Uuid1) == RPC_S_INVALID_STRING_UUID), "Invalid UUID WString\n" );
134 wstr[i2] = wx; /* change it back so remaining tests are interesting. */
136 RpcStringFreeW(&wstr);
140 static void TestDceErrorInqText (void)
142 char bufferInvalid [1024];
143 char buffer [1024]; /* The required size is not documented but would
144 * appear to be 256.
146 DWORD dwCount;
148 dwCount = FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM |
149 FORMAT_MESSAGE_IGNORE_INSERTS,
150 NULL, RPC_S_NOT_RPC_ERROR, 0, bufferInvalid,
151 sizeof(bufferInvalid)/sizeof(bufferInvalid[0]), NULL);
153 /* A random sample of DceErrorInqText */
154 /* 0 is success */
155 ok ((DceErrorInqTextA (0, (unsigned char*)buffer) == RPC_S_OK),
156 "DceErrorInqTextA(0...)\n");
157 /* A real RPC_S error */
158 ok ((DceErrorInqTextA (RPC_S_INVALID_STRING_UUID, (unsigned char*)buffer) == RPC_S_OK),
159 "DceErrorInqTextA(valid...)\n");
161 if (dwCount)
163 /* A message for which FormatMessage should fail
164 * which should return RPC_S_OK and the
165 * fixed "not valid" message
167 ok ((DceErrorInqTextA (35, (unsigned char*)buffer) == RPC_S_OK &&
168 strcmp (buffer, bufferInvalid) == 0),
169 "DceErrorInqTextA(unformattable...)\n");
170 /* One for which FormatMessage should succeed but
171 * DceErrorInqText should "fail"
172 * 3814 is generally quite a long message
174 ok ((DceErrorInqTextA (3814, (unsigned char*)buffer) == RPC_S_OK &&
175 strcmp (buffer, bufferInvalid) == 0),
176 "DceErrorInqTextA(deviation...)\n");
178 else
179 ok (0, "Cannot set up for DceErrorInqText\n");
182 static RPC_DISPATCH_FUNCTION IFoo_table[] =
187 static RPC_DISPATCH_TABLE IFoo_v0_0_DispatchTable =
190 IFoo_table
193 static const RPC_SERVER_INTERFACE IFoo___RpcServerInterface =
195 sizeof(RPC_SERVER_INTERFACE),
196 {{0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x34}},{0,0}},
197 {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
198 &IFoo_v0_0_DispatchTable,
206 static RPC_IF_HANDLE IFoo_v0_0_s_ifspec = (RPC_IF_HANDLE)& IFoo___RpcServerInterface;
208 static void test_rpc_ncacn_ip_tcp(void)
210 RPC_STATUS status;
211 unsigned char *binding;
212 handle_t IFoo_IfHandle;
213 static unsigned char foo[] = "foo";
214 static unsigned char ncacn_ip_tcp[] = "ncacn_ip_tcp";
215 static unsigned char address[] = "127.0.0.1";
216 static unsigned char endpoint[] = "4114";
218 status = RpcNetworkIsProtseqValid(foo);
219 ok(status == RPC_S_INVALID_RPC_PROTSEQ, "return wrong\n");
221 status = RpcNetworkIsProtseqValid(ncacn_ip_tcp);
222 ok(status == RPC_S_OK, "return wrong\n");
224 status = RpcMgmtStopServerListening(NULL);
225 todo_wine {
226 ok(status == RPC_S_NOT_LISTENING,
227 "wrong RpcMgmtStopServerListening error (%lu)\n", status);
230 status = RpcMgmtWaitServerListen();
231 ok(status == RPC_S_NOT_LISTENING,
232 "wrong RpcMgmtWaitServerListen error status (%lu)\n", status);
234 status = RpcServerListen(1, 20, FALSE);
235 ok(status == RPC_S_NO_PROTSEQS_REGISTERED,
236 "wrong RpcServerListen error (%lu)\n", status);
238 status = RpcServerUseProtseqEp(ncacn_ip_tcp, 20, endpoint, NULL);
239 ok(status == RPC_S_OK, "RpcServerUseProtseqEp failed (%lu)\n", status);
241 status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL);
242 ok(status == RPC_S_OK, "RpcServerRegisterIf failed (%lu)\n", status);
244 status = RpcServerListen(1, 20, TRUE);
245 todo_wine {
246 ok(status == RPC_S_OK, "RpcServerListen failed (%lu)\n", status);
249 status = RpcServerListen(1, 20, TRUE);
250 todo_wine {
251 ok(status == RPC_S_ALREADY_LISTENING,
252 "wrong RpcServerListen error (%lu)\n", status);
255 status = RpcStringBindingCompose(NULL, ncacn_ip_tcp, address,
256 endpoint, NULL, &binding);
257 ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status);
259 status = RpcBindingFromStringBinding(binding, &IFoo_IfHandle);
260 ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n",
261 status);
263 status = RpcBindingSetAuthInfo(IFoo_IfHandle, NULL, RPC_C_AUTHN_LEVEL_NONE,
264 RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME);
265 ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%lu)\n", status);
267 status = RpcMgmtStopServerListening(NULL);
268 ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%lu)\n",
269 status);
271 status = RpcMgmtStopServerListening(NULL);
272 ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%lu)\n",
273 status);
275 status = RpcServerUnregisterIf(NULL, NULL, FALSE);
276 ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%lu)\n", status);
278 status = RpcMgmtWaitServerListen();
279 todo_wine {
280 ok(status == RPC_S_OK, "RpcMgmtWaitServerListen failed (%lu)\n", status);
283 status = RpcStringFree(&binding);
284 ok(status == RPC_S_OK, "RpcStringFree failed (%lu)\n", status);
286 status = RpcBindingFree(&IFoo_IfHandle);
287 ok(status == RPC_S_OK, "RpcBindingFree failed (%lu)\n", status);
290 /* this is what's generated with MS/RPC - it includes an extra 2
291 * bytes in the protocol floor */
292 static const unsigned char tower_data_tcp_ip1[] =
294 0x05,0x00,0x13,0x00,0x0d,0x00,0xdb,0xf1,
295 0xa4,0x47,0xca,0x67,0x10,0xb3,0x1f,0x00,
296 0xdd,0x01,0x06,0x62,0xda,0x00,0x00,0x02,
297 0x00,0x00,0x00,0x13,0x00,0x0d,0x04,0x5d,
298 0x88,0x8a,0xeb,0x1c,0xc9,0x11,0x9f,0xe8,
299 0x08,0x00,0x2b,0x10,0x48,0x60,0x02,0x00,
300 0x02,0x00,0x00,0x00,0x01,0x00,0x0b,0x02,
301 0x00,0x00,0x00,0x01,0x00,0x07,0x02,0x00,
302 0x00,0x87,0x01,0x00,0x09,0x04,0x00,0x0a,
303 0x00,0x00,0x01,
305 /* this is the optimal data that i think should be generated */
306 static const unsigned char tower_data_tcp_ip2[] =
308 0x05,0x00,0x13,0x00,0x0d,0x00,0xdb,0xf1,
309 0xa4,0x47,0xca,0x67,0x10,0xb3,0x1f,0x00,
310 0xdd,0x01,0x06,0x62,0xda,0x00,0x00,0x02,
311 0x00,0x00,0x00,0x13,0x00,0x0d,0x04,0x5d,
312 0x88,0x8a,0xeb,0x1c,0xc9,0x11,0x9f,0xe8,
313 0x08,0x00,0x2b,0x10,0x48,0x60,0x02,0x00,
314 0x02,0x00,0x00,0x00,0x01,0x00,0x0b,0x00,
315 0x00,0x01,0x00,0x07,0x02,0x00,0x00,0x87,
316 0x01,0x00,0x09,0x04,0x00,0x0a,0x00,0x00,
317 0x01,
320 static void test_towers(void)
322 RPC_STATUS ret;
323 twr_t *tower;
324 static const RPC_SYNTAX_IDENTIFIER mapi_if_id = { { 0xa4f1db00, 0xca47, 0x1067, { 0xb3, 0x1f, 0x00, 0xdd, 0x01, 0x06, 0x62, 0xda } }, { 0, 0 } };
325 static const RPC_SYNTAX_IDENTIFIER ndr_syntax = { { 0x8a885d04, 0x1ceb, 0x11c9, { 0x9f, 0xe8, 0x08, 0x00, 0x2b, 0x10, 0x48, 0x60 } }, { 2, 0 } };
326 RPC_SYNTAX_IDENTIFIER object, syntax;
327 char *protseq, *endpoint, *address;
328 BOOL same;
330 ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_ip_tcp", "135", "10.0.0.1", &tower);
331 ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret);
332 if (ret == RPC_S_INVALID_RPC_PROTSEQ)
334 /* Windows Vista fails with this error and crashes if we continue */
335 skip("TowerConstruct failed, we are most likely on Windows Vista\n");
336 return;
339 /* first check we have the right amount of data */
340 ok(tower->tower_length == sizeof(tower_data_tcp_ip1) ||
341 tower->tower_length == sizeof(tower_data_tcp_ip2),
342 "Wrong size of tower %d\n", tower->tower_length);
344 /* then do a byte-by-byte comparison */
345 same = ((tower->tower_length == sizeof(tower_data_tcp_ip1)) &&
346 !memcmp(&tower->tower_octet_string, tower_data_tcp_ip1, sizeof(tower_data_tcp_ip1))) ||
347 ((tower->tower_length == sizeof(tower_data_tcp_ip2)) &&
348 !memcmp(&tower->tower_octet_string, tower_data_tcp_ip2, sizeof(tower_data_tcp_ip2)));
350 ok(same, "Tower data differs\n");
351 if (!same)
353 unsigned32 i;
354 for (i = 0; i < tower->tower_length; i++)
356 if (i % 8 == 0) printf(" ");
357 printf("0x%02x,", tower->tower_octet_string[i]);
358 if (i % 8 == 7) printf("\n");
360 printf("\n");
363 ret = TowerExplode(tower, &object, &syntax, &protseq, &endpoint, &address);
364 ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret);
365 ok(!memcmp(&object, &mapi_if_id, sizeof(mapi_if_id)), "object id didn't match\n");
366 ok(!memcmp(&syntax, &ndr_syntax, sizeof(syntax)), "syntax id didn't match\n");
367 ok(!strcmp(protseq, "ncacn_ip_tcp"), "protseq was \"%s\" instead of \"ncacn_ip_tcp\"\n", protseq);
368 ok(!strcmp(endpoint, "135"), "endpoint was \"%s\" instead of \"135\"\n", endpoint);
369 ok(!strcmp(address, "10.0.0.1"), "address was \"%s\" instead of \"10.0.0.1\"\n", address);
371 I_RpcFree(protseq);
372 I_RpcFree(endpoint);
373 I_RpcFree(address);
375 ret = TowerExplode(tower, NULL, NULL, NULL, NULL, NULL);
376 ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret);
378 I_RpcFree(tower);
380 /* test the behaviour for ip_tcp with name instead of dotted IP notation */
381 ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_ip_tcp", "135", "localhost", &tower);
382 ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret);
383 ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address);
384 ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret);
385 ok(!strcmp(address, "0.0.0.0"), "address was \"%s\" instead of \"0.0.0.0\"\n", address);
387 I_RpcFree(address);
388 I_RpcFree(tower);
390 /* test the behaviour for np with no address */
391 ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_np", "\\pipe\\test", NULL, &tower);
392 ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret);
393 ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address);
394 ok(ret == RPC_S_OK ||
395 broken(ret != RPC_S_OK), /* win2k, indeterminate */
396 "TowerExplode failed with error %ld\n", ret);
397 /* Windows XP SP3 sets address to NULL */
398 ok(!address || !strcmp(address, ""), "address was \"%s\" instead of \"\"\n or NULL (XP SP3)", address);
400 I_RpcFree(address);
401 I_RpcFree(tower);
404 static void test_I_RpcMapWin32Status(void)
406 LONG win32status;
407 RPC_STATUS rpc_status;
408 BOOL on_win9x = FALSE;
409 BOOL w2k3_up = FALSE;
411 /* Win9x always returns the given status */
412 win32status = I_RpcMapWin32Status(ERROR_ACCESS_DENIED);
413 if (win32status == ERROR_ACCESS_DENIED)
414 on_win9x = TRUE;
416 /* Windows 2003 and Vista return STATUS_UNSUCCESSFUL if given an unknown status */
417 win32status = I_RpcMapWin32Status(9999);
418 if (win32status == STATUS_UNSUCCESSFUL)
420 trace("We are on Windows 2003 or Vista\n");
421 w2k3_up = TRUE;
424 /* On Windows XP-SP1 and below some statuses are not mapped and return
425 * the given status
427 for (rpc_status = 0; rpc_status < 10000; rpc_status++)
429 LONG expected_win32status;
430 BOOL missing = FALSE;
432 win32status = I_RpcMapWin32Status(rpc_status);
433 switch (rpc_status)
435 case ERROR_SUCCESS: expected_win32status = ERROR_SUCCESS; break;
436 case ERROR_ACCESS_DENIED: expected_win32status = STATUS_ACCESS_DENIED; break;
437 case ERROR_INVALID_HANDLE: expected_win32status = RPC_NT_SS_CONTEXT_MISMATCH; break;
438 case ERROR_OUTOFMEMORY: expected_win32status = STATUS_NO_MEMORY; break;
439 case ERROR_INVALID_PARAMETER: expected_win32status = STATUS_INVALID_PARAMETER; break;
440 case ERROR_INSUFFICIENT_BUFFER: expected_win32status = STATUS_BUFFER_TOO_SMALL; break;
441 case ERROR_MAX_THRDS_REACHED: expected_win32status = STATUS_NO_MEMORY; break;
442 case ERROR_NOACCESS: expected_win32status = STATUS_ACCESS_VIOLATION; break;
443 case ERROR_NOT_ENOUGH_SERVER_MEMORY: expected_win32status = STATUS_INSUFF_SERVER_RESOURCES; break;
444 case ERROR_WRONG_PASSWORD: expected_win32status = STATUS_WRONG_PASSWORD; missing = TRUE; break;
445 case ERROR_INVALID_LOGON_HOURS: expected_win32status = STATUS_INVALID_LOGON_HOURS; missing = TRUE; break;
446 case ERROR_PASSWORD_EXPIRED: expected_win32status = STATUS_PASSWORD_EXPIRED; missing = TRUE; break;
447 case ERROR_ACCOUNT_DISABLED: expected_win32status = STATUS_ACCOUNT_DISABLED; missing = TRUE; break;
448 case ERROR_INVALID_SECURITY_DESCR: expected_win32status = STATUS_INVALID_SECURITY_DESCR; break;
449 case RPC_S_INVALID_STRING_BINDING: expected_win32status = RPC_NT_INVALID_STRING_BINDING; break;
450 case RPC_S_WRONG_KIND_OF_BINDING: expected_win32status = RPC_NT_WRONG_KIND_OF_BINDING; break;
451 case RPC_S_INVALID_BINDING: expected_win32status = RPC_NT_INVALID_BINDING; break;
452 case RPC_S_PROTSEQ_NOT_SUPPORTED: expected_win32status = RPC_NT_PROTSEQ_NOT_SUPPORTED; break;
453 case RPC_S_INVALID_RPC_PROTSEQ: expected_win32status = RPC_NT_INVALID_RPC_PROTSEQ; break;
454 case RPC_S_INVALID_STRING_UUID: expected_win32status = RPC_NT_INVALID_STRING_UUID; break;
455 case RPC_S_INVALID_ENDPOINT_FORMAT: expected_win32status = RPC_NT_INVALID_ENDPOINT_FORMAT; break;
456 case RPC_S_INVALID_NET_ADDR: expected_win32status = RPC_NT_INVALID_NET_ADDR; break;
457 case RPC_S_NO_ENDPOINT_FOUND: expected_win32status = RPC_NT_NO_ENDPOINT_FOUND; break;
458 case RPC_S_INVALID_TIMEOUT: expected_win32status = RPC_NT_INVALID_TIMEOUT; break;
459 case RPC_S_OBJECT_NOT_FOUND: expected_win32status = RPC_NT_OBJECT_NOT_FOUND; break;
460 case RPC_S_ALREADY_REGISTERED: expected_win32status = RPC_NT_ALREADY_REGISTERED; break;
461 case RPC_S_TYPE_ALREADY_REGISTERED: expected_win32status = RPC_NT_TYPE_ALREADY_REGISTERED; break;
462 case RPC_S_ALREADY_LISTENING: expected_win32status = RPC_NT_ALREADY_LISTENING; break;
463 case RPC_S_NO_PROTSEQS_REGISTERED: expected_win32status = RPC_NT_NO_PROTSEQS_REGISTERED; break;
464 case RPC_S_NOT_LISTENING: expected_win32status = RPC_NT_NOT_LISTENING; break;
465 case RPC_S_UNKNOWN_MGR_TYPE: expected_win32status = RPC_NT_UNKNOWN_MGR_TYPE; break;
466 case RPC_S_UNKNOWN_IF: expected_win32status = RPC_NT_UNKNOWN_IF; break;
467 case RPC_S_NO_BINDINGS: expected_win32status = RPC_NT_NO_BINDINGS; break;
468 case RPC_S_NO_PROTSEQS: expected_win32status = RPC_NT_NO_PROTSEQS; break;
469 case RPC_S_CANT_CREATE_ENDPOINT: expected_win32status = RPC_NT_CANT_CREATE_ENDPOINT; break;
470 case RPC_S_OUT_OF_RESOURCES: expected_win32status = RPC_NT_OUT_OF_RESOURCES; break;
471 case RPC_S_SERVER_UNAVAILABLE: expected_win32status = RPC_NT_SERVER_UNAVAILABLE; break;
472 case RPC_S_SERVER_TOO_BUSY: expected_win32status = RPC_NT_SERVER_TOO_BUSY; break;
473 case RPC_S_INVALID_NETWORK_OPTIONS: expected_win32status = RPC_NT_INVALID_NETWORK_OPTIONS; break;
474 case RPC_S_NO_CALL_ACTIVE: expected_win32status = RPC_NT_NO_CALL_ACTIVE; break;
475 case RPC_S_CALL_FAILED: expected_win32status = RPC_NT_CALL_FAILED; break;
476 case RPC_S_CALL_FAILED_DNE: expected_win32status = RPC_NT_CALL_FAILED_DNE; break;
477 case RPC_S_PROTOCOL_ERROR: expected_win32status = RPC_NT_PROTOCOL_ERROR; break;
478 case RPC_S_UNSUPPORTED_TRANS_SYN: expected_win32status = RPC_NT_UNSUPPORTED_TRANS_SYN; break;
479 case RPC_S_UNSUPPORTED_TYPE: expected_win32status = RPC_NT_UNSUPPORTED_TYPE; break;
480 case RPC_S_INVALID_TAG: expected_win32status = RPC_NT_INVALID_TAG; break;
481 case RPC_S_INVALID_BOUND: expected_win32status = RPC_NT_INVALID_BOUND; break;
482 case RPC_S_NO_ENTRY_NAME: expected_win32status = RPC_NT_NO_ENTRY_NAME; break;
483 case RPC_S_INVALID_NAME_SYNTAX: expected_win32status = RPC_NT_INVALID_NAME_SYNTAX; break;
484 case RPC_S_UNSUPPORTED_NAME_SYNTAX: expected_win32status = RPC_NT_UNSUPPORTED_NAME_SYNTAX; break;
485 case RPC_S_UUID_NO_ADDRESS: expected_win32status = RPC_NT_UUID_NO_ADDRESS; break;
486 case RPC_S_DUPLICATE_ENDPOINT: expected_win32status = RPC_NT_DUPLICATE_ENDPOINT; break;
487 case RPC_S_UNKNOWN_AUTHN_TYPE: expected_win32status = RPC_NT_UNKNOWN_AUTHN_TYPE; break;
488 case RPC_S_MAX_CALLS_TOO_SMALL: expected_win32status = RPC_NT_MAX_CALLS_TOO_SMALL; break;
489 case RPC_S_STRING_TOO_LONG: expected_win32status = RPC_NT_STRING_TOO_LONG; break;
490 case RPC_S_PROTSEQ_NOT_FOUND: expected_win32status = RPC_NT_PROTSEQ_NOT_FOUND; break;
491 case RPC_S_PROCNUM_OUT_OF_RANGE: expected_win32status = RPC_NT_PROCNUM_OUT_OF_RANGE; break;
492 case RPC_S_BINDING_HAS_NO_AUTH: expected_win32status = RPC_NT_BINDING_HAS_NO_AUTH; break;
493 case RPC_S_UNKNOWN_AUTHN_SERVICE: expected_win32status = RPC_NT_UNKNOWN_AUTHN_SERVICE; break;
494 case RPC_S_UNKNOWN_AUTHN_LEVEL: expected_win32status = RPC_NT_UNKNOWN_AUTHN_LEVEL; break;
495 case RPC_S_INVALID_AUTH_IDENTITY: expected_win32status = RPC_NT_INVALID_AUTH_IDENTITY; break;
496 case RPC_S_UNKNOWN_AUTHZ_SERVICE: expected_win32status = RPC_NT_UNKNOWN_AUTHZ_SERVICE; break;
497 case EPT_S_INVALID_ENTRY: expected_win32status = EPT_NT_INVALID_ENTRY; break;
498 case EPT_S_CANT_PERFORM_OP: expected_win32status = EPT_NT_CANT_PERFORM_OP; break;
499 case EPT_S_NOT_REGISTERED: expected_win32status = EPT_NT_NOT_REGISTERED; break;
500 case EPT_S_CANT_CREATE: expected_win32status = EPT_NT_CANT_CREATE; break;
501 case RPC_S_NOTHING_TO_EXPORT: expected_win32status = RPC_NT_NOTHING_TO_EXPORT; break;
502 case RPC_S_INCOMPLETE_NAME: expected_win32status = RPC_NT_INCOMPLETE_NAME; break;
503 case RPC_S_INVALID_VERS_OPTION: expected_win32status = RPC_NT_INVALID_VERS_OPTION; break;
504 case RPC_S_NO_MORE_MEMBERS: expected_win32status = RPC_NT_NO_MORE_MEMBERS; break;
505 case RPC_S_NOT_ALL_OBJS_UNEXPORTED: expected_win32status = RPC_NT_NOT_ALL_OBJS_UNEXPORTED; break;
506 case RPC_S_INTERFACE_NOT_FOUND: expected_win32status = RPC_NT_INTERFACE_NOT_FOUND; break;
507 case RPC_S_ENTRY_ALREADY_EXISTS: expected_win32status = RPC_NT_ENTRY_ALREADY_EXISTS; break;
508 case RPC_S_ENTRY_NOT_FOUND: expected_win32status = RPC_NT_ENTRY_NOT_FOUND; break;
509 case RPC_S_NAME_SERVICE_UNAVAILABLE: expected_win32status = RPC_NT_NAME_SERVICE_UNAVAILABLE; break;
510 case RPC_S_INVALID_NAF_ID: expected_win32status = RPC_NT_INVALID_NAF_ID; break;
511 case RPC_S_CANNOT_SUPPORT: expected_win32status = RPC_NT_CANNOT_SUPPORT; break;
512 case RPC_S_NO_CONTEXT_AVAILABLE: expected_win32status = RPC_NT_NO_CONTEXT_AVAILABLE; break;
513 case RPC_S_INTERNAL_ERROR: expected_win32status = RPC_NT_INTERNAL_ERROR; break;
514 case RPC_S_ZERO_DIVIDE: expected_win32status = RPC_NT_ZERO_DIVIDE; break;
515 case RPC_S_ADDRESS_ERROR: expected_win32status = RPC_NT_ADDRESS_ERROR; break;
516 case RPC_S_FP_DIV_ZERO: expected_win32status = RPC_NT_FP_DIV_ZERO; break;
517 case RPC_S_FP_UNDERFLOW: expected_win32status = RPC_NT_FP_UNDERFLOW; break;
518 case RPC_S_FP_OVERFLOW: expected_win32status = RPC_NT_FP_OVERFLOW; break;
519 case RPC_S_CALL_IN_PROGRESS: expected_win32status = RPC_NT_CALL_IN_PROGRESS; break;
520 case RPC_S_NO_MORE_BINDINGS: expected_win32status = RPC_NT_NO_MORE_BINDINGS; break;
521 case RPC_S_CALL_CANCELLED: expected_win32status = RPC_NT_CALL_CANCELLED; missing = TRUE; break;
522 case RPC_S_INVALID_OBJECT: expected_win32status = RPC_NT_INVALID_OBJECT; break;
523 case RPC_S_INVALID_ASYNC_HANDLE: expected_win32status = RPC_NT_INVALID_ASYNC_HANDLE; missing = TRUE; break;
524 case RPC_S_INVALID_ASYNC_CALL: expected_win32status = RPC_NT_INVALID_ASYNC_CALL; missing = TRUE; break;
525 case RPC_S_GROUP_MEMBER_NOT_FOUND: expected_win32status = RPC_NT_GROUP_MEMBER_NOT_FOUND; break;
526 case RPC_X_NO_MORE_ENTRIES: expected_win32status = RPC_NT_NO_MORE_ENTRIES; break;
527 case RPC_X_SS_CHAR_TRANS_OPEN_FAIL: expected_win32status = RPC_NT_SS_CHAR_TRANS_OPEN_FAIL; break;
528 case RPC_X_SS_CHAR_TRANS_SHORT_FILE: expected_win32status = RPC_NT_SS_CHAR_TRANS_SHORT_FILE; break;
529 case RPC_X_SS_IN_NULL_CONTEXT: expected_win32status = RPC_NT_SS_IN_NULL_CONTEXT; break;
530 case RPC_X_SS_CONTEXT_DAMAGED: expected_win32status = RPC_NT_SS_CONTEXT_DAMAGED; break;
531 case RPC_X_SS_HANDLES_MISMATCH: expected_win32status = RPC_NT_SS_HANDLES_MISMATCH; break;
532 case RPC_X_SS_CANNOT_GET_CALL_HANDLE: expected_win32status = RPC_NT_SS_CANNOT_GET_CALL_HANDLE; break;
533 case RPC_X_NULL_REF_POINTER: expected_win32status = RPC_NT_NULL_REF_POINTER; break;
534 case RPC_X_ENUM_VALUE_OUT_OF_RANGE: expected_win32status = RPC_NT_ENUM_VALUE_OUT_OF_RANGE; break;
535 case RPC_X_BYTE_COUNT_TOO_SMALL: expected_win32status = RPC_NT_BYTE_COUNT_TOO_SMALL; break;
536 case RPC_X_BAD_STUB_DATA: expected_win32status = RPC_NT_BAD_STUB_DATA; break;
537 case RPC_X_PIPE_CLOSED: expected_win32status = RPC_NT_PIPE_CLOSED; missing = TRUE; break;
538 case RPC_X_PIPE_DISCIPLINE_ERROR: expected_win32status = RPC_NT_PIPE_DISCIPLINE_ERROR; missing = TRUE; break;
539 case RPC_X_PIPE_EMPTY: expected_win32status = RPC_NT_PIPE_EMPTY; missing = TRUE; break;
540 case ERROR_PASSWORD_MUST_CHANGE: expected_win32status = STATUS_PASSWORD_MUST_CHANGE; missing = TRUE; break;
541 case ERROR_ACCOUNT_LOCKED_OUT: expected_win32status = STATUS_ACCOUNT_LOCKED_OUT; missing = TRUE; break;
542 default:
543 if (w2k3_up)
544 expected_win32status = STATUS_UNSUCCESSFUL;
545 else
546 expected_win32status = rpc_status;
549 if (on_win9x)
550 missing = TRUE;
552 ok(win32status == expected_win32status ||
553 broken(missing && win32status == rpc_status),
554 "I_RpcMapWin32Status(%ld) should have returned 0x%x instead of 0x%x%s\n",
555 rpc_status, expected_win32status, win32status,
556 broken(missing) ? " (or have returned with the given status)" : "");
560 static void test_RpcStringBindingParseA(void)
562 static unsigned char valid_binding[] = "00000000-0000-0000-c000-000000000046@ncacn_np:.[endpoint=\\pipe\\test]";
563 static unsigned char valid_binding2[] = "00000000-0000-0000-c000-000000000046@ncacn_np:.[\\pipe\\test]";
564 static unsigned char invalid_uuid_binding[] = "{00000000-0000-0000-c000-000000000046}@ncacn_np:.[endpoint=\\pipe\\test]";
565 static unsigned char invalid_ep_binding[] = "00000000-0000-0000-c000-000000000046@ncacn_np:.[endpoint=test]";
566 static unsigned char invalid_binding[] = "00000000-0000-0000-c000-000000000046@ncacn_np";
567 RPC_STATUS status;
568 unsigned char *uuid;
569 unsigned char *protseq;
570 unsigned char *network_addr;
571 unsigned char *endpoint;
572 unsigned char *options;
574 /* test all parameters */
575 status = RpcStringBindingParseA(valid_binding, &uuid, &protseq, &network_addr, &endpoint, &options);
576 ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status);
577 ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid);
578 ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq);
579 ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr);
580 ok(!strcmp((char *)endpoint, "pipetest"), "endpoint should have been pipetest instead of %s\n", endpoint);
581 todo_wine
582 ok(options && !strcmp((char *)options, ""), "options should have been \"\" of \"%s\"\n", options);
583 RpcStringFreeA(&uuid);
584 RpcStringFreeA(&protseq);
585 RpcStringFreeA(&network_addr);
586 RpcStringFreeA(&endpoint);
587 RpcStringFreeA(&options);
589 /* test all parameters with different type of string binding */
590 status = RpcStringBindingParseA(valid_binding2, &uuid, &protseq, &network_addr, &endpoint, &options);
591 ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status);
592 ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid);
593 ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq);
594 ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr);
595 ok(!strcmp((char *)endpoint, "pipetest"), "endpoint should have been pipetest instead of %s\n", endpoint);
596 todo_wine
597 ok(options && !strcmp((char *)options, ""), "options should have been \"\" of \"%s\"\n", options);
598 RpcStringFreeA(&uuid);
599 RpcStringFreeA(&protseq);
600 RpcStringFreeA(&network_addr);
601 RpcStringFreeA(&endpoint);
602 RpcStringFreeA(&options);
604 /* test with as many parameters NULL as possible */
605 status = RpcStringBindingParseA(valid_binding, NULL, &protseq, NULL, NULL, NULL);
606 ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status);
607 ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq);
608 RpcStringFreeA(&protseq);
610 /* test with invalid uuid */
611 status = RpcStringBindingParseA(invalid_uuid_binding, NULL, &protseq, NULL, NULL, NULL);
612 ok(status == RPC_S_INVALID_STRING_UUID, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_UUID instead of %ld\n", status);
613 ok(protseq == NULL, "protseq was %p instead of NULL\n", protseq);
615 /* test with invalid endpoint */
616 status = RpcStringBindingParseA(invalid_ep_binding, NULL, &protseq, NULL, NULL, NULL);
617 ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status);
618 RpcStringFreeA(&protseq);
620 /* test with invalid binding */
621 status = RpcStringBindingParseA(invalid_binding, &uuid, &protseq, &network_addr, &endpoint, &options);
622 todo_wine
623 ok(status == RPC_S_INVALID_STRING_BINDING, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_BINDING instead of %ld\n", status);
624 todo_wine
625 ok(uuid == NULL, "uuid was %p instead of NULL\n", uuid);
626 ok(protseq == NULL, "protseq was %p instead of NULL\n", protseq);
627 todo_wine
628 ok(network_addr == NULL, "network_addr was %p instead of NULL\n", network_addr);
629 ok(endpoint == NULL, "endpoint was %p instead of NULL\n", endpoint);
630 ok(options == NULL, "options was %p instead of NULL\n", options);
633 static void test_I_RpcExceptionFilter(void)
635 ULONG exception;
636 int retval;
637 int (WINAPI *pI_RpcExceptionFilter)(ULONG) = (void *)GetProcAddress(GetModuleHandle("rpcrt4.dll"), "I_RpcExceptionFilter");
639 if (!pI_RpcExceptionFilter)
641 skip("I_RpcExceptionFilter not exported\n");
642 return;
645 for (exception = 0; exception < STATUS_REG_NAT_CONSUMPTION; exception++)
647 /* skip over uninteresting bits of the number space */
648 if (exception == 2000) exception = 0x40000000;
649 if (exception == 0x40000005) exception = 0x80000000;
650 if (exception == 0x80000005) exception = 0xc0000000;
652 retval = pI_RpcExceptionFilter(exception);
653 switch (exception)
655 case STATUS_DATATYPE_MISALIGNMENT:
656 case STATUS_BREAKPOINT:
657 case STATUS_ACCESS_VIOLATION:
658 case STATUS_ILLEGAL_INSTRUCTION:
659 case STATUS_PRIVILEGED_INSTRUCTION:
660 case 0xc00000aa /* STATUS_INSTRUCTION_MISALIGNMENT */:
661 case STATUS_STACK_OVERFLOW:
662 case 0xc0000194 /* STATUS_POSSIBLE_DEADLOCK */:
663 ok(retval == EXCEPTION_CONTINUE_SEARCH, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n",
664 exception, EXCEPTION_CONTINUE_SEARCH, retval);
665 break;
666 case STATUS_IN_PAGE_ERROR:
667 case STATUS_HANDLE_NOT_CLOSABLE:
668 trace("I_RpcExceptionFilter(0x%x) returned %d\n", exception, retval);
669 break;
670 default:
671 ok(retval == EXCEPTION_EXECUTE_HANDLER, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n",
672 exception, EXCEPTION_EXECUTE_HANDLER, retval);
677 static void test_endpoint_mapper(RPC_CSTR protseq, RPC_CSTR address,
678 RPC_CSTR endpoint)
680 static unsigned char annotation[] = "Test annotation string.";
681 RPC_STATUS status;
682 RPC_BINDING_VECTOR *binding_vector;
683 handle_t handle;
684 unsigned char *binding;
686 status = RpcServerUseProtseqEp(protseq, 20, endpoint, NULL);
687 ok(status == RPC_S_OK, "%s: RpcServerUseProtseqEp failed (%lu)\n", protseq, status);
689 status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL);
690 ok(status == RPC_S_OK, "%s: RpcServerRegisterIf failed (%lu)\n", protseq, status);
692 status = RpcServerInqBindings(&binding_vector);
693 ok(status == RPC_S_OK, "%s: RpcServerInqBindings failed with error %lu\n", protseq, status);
695 status = RpcEpRegisterA(IFoo_v0_0_s_ifspec, binding_vector, NULL, annotation);
696 ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %lu\n", protseq, status);
698 status = RpcStringBindingCompose(NULL, protseq, address,
699 NULL, NULL, &binding);
700 ok(status == RPC_S_OK, "%s: RpcStringBindingCompose failed (%lu)\n", protseq, status);
702 status = RpcBindingFromStringBinding(binding, &handle);
703 ok(status == RPC_S_OK, "%s: RpcBindingFromStringBinding failed (%lu)\n", protseq, status);
705 RpcStringFree(&binding);
707 status = RpcBindingReset(handle);
708 ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %lu\n", protseq, status);
710 RpcStringFree(&binding);
712 status = RpcEpResolveBinding(handle, IFoo_v0_0_s_ifspec);
713 ok(status == RPC_S_OK, "%s: RpcEpResolveBinding failed with error %lu\n", protseq, status);
715 status = RpcBindingReset(handle);
716 ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %lu\n", protseq, status);
718 status = RpcBindingFree(&handle);
719 ok(status == RPC_S_OK, "%s: RpcBindingFree failed with error %lu\n", protseq, status);
721 status = RpcServerUnregisterIf(NULL, NULL, FALSE);
722 ok(status == RPC_S_OK, "%s: RpcServerUnregisterIf failed (%lu)\n", protseq, status);
724 status = RpcEpUnregister(IFoo_v0_0_s_ifspec, binding_vector, NULL);
725 ok(status == RPC_S_OK, "%s: RpcEpUnregisterA failed with error %lu\n", protseq, status);
727 status = RpcBindingVectorFree(&binding_vector);
728 ok(status == RPC_S_OK, "%s: RpcBindingVectorFree failed with error %lu\n", protseq, status);
731 static void test_RpcStringBindingFromBinding(void)
733 static unsigned char ncacn_np[] = "ncacn_np";
734 static unsigned char address[] = ".";
735 static unsigned char endpoint[] = "\\pipe\\wine_rpc_test";
736 RPC_STATUS status;
737 handle_t handle;
738 RPC_CSTR binding;
740 status = RpcStringBindingCompose(NULL, ncacn_np, address,
741 endpoint, NULL, &binding);
742 ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status);
744 status = RpcBindingFromStringBinding(binding, &handle);
745 ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status);
746 RpcStringFree(&binding);
748 status = RpcBindingToStringBinding(handle, &binding);
749 ok(status == RPC_S_OK, "RpcStringBindingFromBinding failed with error %lu\n", status);
751 ok(!strcmp((const char *)binding, "ncacn_np:.[\\\\pipe\\\\wine_rpc_test]"),
752 "binding string didn't match what was expected: \"%s\"\n", binding);
753 RpcStringFree(&binding);
755 status = RpcBindingFree(&handle);
756 ok(status == RPC_S_OK, "RpcBindingFree failed with error %lu\n", status);
759 START_TEST( rpc )
761 static unsigned char ncacn_np[] = "ncacn_np";
762 static unsigned char ncalrpc[] = "ncalrpc";
763 static unsigned char np_address[] = ".";
764 static unsigned char np_endpoint[] = "\\pipe\\wine_rpc_test";
765 static unsigned char lrpc_endpoint[] = "wine_rpc_test";
767 UuidConversionAndComparison();
768 TestDceErrorInqText();
769 test_rpc_ncacn_ip_tcp();
770 test_towers();
771 test_I_RpcMapWin32Status();
772 test_RpcStringBindingParseA();
773 test_I_RpcExceptionFilter();
774 test_endpoint_mapper(ncacn_np, np_address, np_endpoint);
775 test_endpoint_mapper(ncalrpc, NULL, lrpc_endpoint);
776 test_RpcStringBindingFromBinding();