28#define WIN32_NO_STATUS
39#define FASTCALL __fastcall
51#include "wine/rbtree.h"
53#ifndef __WINE_WINTERNL_H
78#define htons(s) ((USHORT)(s))
82 return (
s >> 8) | (
s << 8);
84#define htons(s) __my_ushort_swap(s)
88#ifdef __ASM_USE_FASTCALL_WRAPPER
93 "xchgl (%esp),%ecx\n\t"
95#define call_fastcall_func1(func,a) wrap_fastcall_func1(func,a)
97#define call_fastcall_func1(func,a) func(a)
121static NTSTATUS (
WINAPI *pLdrEnumerateLoadedModules)(
void *,
void *,
void *);
141static const char*
src_src =
"This is a test!";
142static WCHAR ws2_32dllW[] = {
'w',
's',
'2',
'_',
'3',
'2',
'.',
'd',
'l',
'l',0};
144static WCHAR wintrustdllW[] = {
'w',
'i',
'n',
't',
'r',
'u',
's',
't',
'.',
'd',
'l',
'l',0};
145static WCHAR crypt32dllW[] = {
'c',
'r',
'y',
'p',
't',
'3',
'2',
'.',
'd',
'l',
'l',0};
155 ok(
hntdll != 0,
"LoadLibrary failed\n");
172 pRtlIsCriticalSectionLockedByThread = (
void *)
GetProcAddress(
hntdll,
"RtlIsCriticalSectionLockedByThread");
173 pRtlInitializeCriticalSectionEx = (
void *)
GetProcAddress(
hntdll,
"RtlInitializeCriticalSectionEx");
181 pRtlConvertDeviceFamilyInfoToString = (
void *)
GetProcAddress(
hntdll,
"RtlConvertDeviceFamilyInfoToString");
192 ok(
strlen(
src) == 15,
"Source must be 16 bytes long!\n");
202 ok(
buffer !=
NULL,
"RtlCreateQueryDebugBuffer returned NULL" );
212 ok( !
status,
"RtlQueryProcessDebugInformation returned %lx\n",
status );
214 ok(
buffer->HeapInformation !=
NULL,
"unexpected HeapInformation %p\n",
buffer->HeapInformation);
217 ok( !
status,
"RtlDestroyQueryDebugBuffer returned %lx\n",
status );
221 ok(
buffer !=
NULL,
"RtlCreateQueryDebugBuffer returned NULL" );
224 ok( !
status,
"RtlQueryProcessDebugInformation returned %lx\n",
status );
226 ok(
buffer->ModuleInformation !=
NULL,
"unexpected ModuleInformation %p\n",
buffer->ModuleInformation);
229 ok( !
status,
"RtlDestroyQueryDebugBuffer returned %lx\n",
status );
232#define COMP(str1,str2,cmplen,len) size = RtlCompareMemory(str1, str2, cmplen); \
233 ok(size == len, "Expected %Id, got %Id\n", size, (SIZE_T)len)
257 ok(
result == 0,
"RtlCompareMemoryUlong(%p, 0, 0x0123) returns %lu, expected 0\n",
a,
result);
259 ok(
result == 0,
"RtlCompareMemoryUlong(%p, 3, 0x0123) returns %lu, expected 0\n",
a,
result);
261 ok(
result == 4,
"RtlCompareMemoryUlong(%p, 4, 0x0123) returns %lu, expected 4\n",
a,
result);
263 ok(
result == 4 || !
result ,
"RtlCompareMemoryUlong(%p, 5, 0x0123) returns %lu, expected 4\n",
a,
result);
265 ok(
result == 4 || !
result ,
"RtlCompareMemoryUlong(%p, 7, 0x0123) returns %lu, expected 4\n",
a,
result);
267 ok(
result == 4,
"RtlCompareMemoryUlong(%p, 8, 0x0123) returns %lu, expected 4\n",
a,
result);
269 ok(
result == 4 || !
result ,
"RtlCompareMemoryUlong(%p, 9, 0x0123) returns %lu, expected 4\n",
a,
result);
271 ok(
result == 0,
"RtlCompareMemoryUlong(%p, 4, 0x0127) returns %lu, expected 0\n",
a,
result);
273 ok(
result == 0 ||
result == 1 ,
"RtlCompareMemoryUlong(%p, 4, 0x7123) returns %lu, expected 0\n",
a,
result);
275 ok(
result == 0,
"RtlCompareMemoryUlong(%p, 16, 0x4567) returns %lu, expected 0\n",
a,
result);
279 ok(
result == 0,
"RtlCompareMemoryUlong(%p, 3, 0x0123) returns %lu, expected 0\n",
a,
result);
281 ok(
result == 4,
"RtlCompareMemoryUlong(%p, 4, 0x0123) returns %lu, expected 4\n",
a,
result);
283 ok(
result == 4 || !
result ,
"RtlCompareMemoryUlong(%p, 5, 0x0123) returns %lu, expected 4\n",
a,
result);
285 ok(
result == 4 || !
result ,
"RtlCompareMemoryUlong(%p, 7, 0x0123) returns %lu, expected 4\n",
a,
result);
287 ok(
result == 8,
"RtlCompareMemoryUlong(%p, 8, 0x0123) returns %lu, expected 8\n",
a,
result);
289 ok(
result == 8 || !
result ,
"RtlCompareMemoryUlong(%p, 9, 0x0123) returns %lu, expected 8\n",
a,
result);
292#define COPY(len) memset(dest,0,sizeof(dest_aligned_block)); pRtlMoveMemory(dest, src, len)
293#define CMP(str) ok(strcmp(dest,str) == 0, "Expected '%s', got '%s'\n", str, dest)
299 win_skip(
"RtlMoveMemory is not available\n");
319 CMP(
"his is a test!!");
321 CMP(
"TThis is a test!");
324#define FILL(len) memset(dest,0,sizeof(dest_aligned_block)); strcpy(dest, src); pRtlFillMemory(dest,len,'x')
330 win_skip(
"RtlFillMemory is not available\n");
337 FILL(0);
CMP(
"This is a test!");
338 FILL(1);
CMP(
"xhis is a test!");
339 FILL(2);
CMP(
"xxis is a test!");
340 FILL(3);
CMP(
"xxxs is a test!");
341 FILL(4);
CMP(
"xxxx is a test!");
342 FILL(5);
CMP(
"xxxxxis a test!");
343 FILL(6);
CMP(
"xxxxxxs a test!");
344 FILL(7);
CMP(
"xxxxxxx a test!");
345 FILL(8);
CMP(
"xxxxxxxxa test!");
346 FILL(9);
CMP(
"xxxxxxxxx test!");
349#define LFILL(len) memset(dest,0,sizeof(dest_aligned_block)); strcpy(dest, src); pRtlFillMemoryUlong(dest,len,val)
353 ULONG val = (
'x' << 24) | (
'x' << 16) | (
'x' << 8) |
'x';
354 if (!pRtlFillMemoryUlong)
356 win_skip(
"RtlFillMemoryUlong is not available\n");
375#define ZERO(len) memset(dest,0,sizeof(dest_aligned_block)); strcpy(dest, src); pRtlZeroMemory(dest,len)
376#define MCMP(str) ok(memcmp(dest,str,LEN) == 0, "Memcmp failed\n")
382 win_skip(
"RtlZeroMemory is not available\n");
390 ZERO(3);
MCMP(
"\0\0\0s is a test!");
391 ZERO(4);
MCMP(
"\0\0\0\0 is a test!");
392 ZERO(5);
MCMP(
"\0\0\0\0\0is a test!");
393 ZERO(6);
MCMP(
"\0\0\0\0\0\0s a test!");
394 ZERO(7);
MCMP(
"\0\0\0\0\0\0\0 a test!");
395 ZERO(8);
MCMP(
"\0\0\0\0\0\0\0\0a test!");
396 ZERO(9);
MCMP(
"\0\0\0\0\0\0\0\0\0 test!");
408 ok( 0x3412 == sresult,
409 "inlined RtlUshortByteSwap() returns 0x%x\n", sresult );
411 ok( 0x21436587 == lresult,
412 "inlined RtlUlongByteSwap() returns 0x%lx\n", lresult );
414 ok( 0x2143658710325476 == llresult,
415 "inlined RtlUlonglongByteSwap() returns %#I64x\n", llresult );
417 ok( pRtlUshortByteSwap !=
NULL,
"RtlUshortByteSwap is not available\n" );
418 if ( pRtlUshortByteSwap )
421 ok( 0x3412u == sresult,
422 "ntdll.RtlUshortByteSwap() returns %#x\n", sresult );
425 ok( pRtlUlongByteSwap !=
NULL,
"RtlUlongByteSwap is not available\n" );
426 if ( pRtlUlongByteSwap )
429 ok( 0x21436587ul == lresult,
430 "ntdll.RtlUlongByteSwap() returns %#lx\n", lresult );
439 skip(
"Skipping RtlUlonglongByteSwap test due to broken calling convention\n");
444 ok( pRtlUlonglongByteSwap !=
NULL,
"RtlUlonglongByteSwap is not available\n");
445 if ( pRtlUlonglongByteSwap )
447 llresult = pRtlUlonglongByteSwap( 0x7654321087654321ull );
448 ok( 0x2143658710325476ull == llresult,
449 "ntdll.RtlUlonglongByteSwap() returns %#I64x\n", llresult );
457 const ULONG step = 0x7fff;
467 skip(
"Skipping tests for RtlUniform, because it's broken on Windows 2003\n");
493 "RtlUniform(&seed (seed == 0)) returns %lx, expected %lx\n",
510 "RtlUniform(&seed (seed == 0x80000000)) returns %lx, expected %lx\n",
522 "RtlUniform(&seed (seed == 0x7fffffff)) returns %lx, expected %lx\n",
541 "RtlUniform(&seed (seed == 1)) returns %lx, expected %lx\n",
551 "test: RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n",
554 "test: RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n",
558 }
while (
num >= 2 + step);
566 "test: %ld RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n",
569 "test: %ld RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n",
585 ok(seed !=
res[
i],
"%i: seed is same as res %lx\n",
i, seed);
586 for (
j = 0;
j <
i;
j++)
599 {0xFEDCBA76, 0xFEDCBA76, 1},
600 {0x00000000, 0xFEDCBA76, 0},
601 {0xFEDCBA76, 0x00000000, 1},
602 {0x00000000, 0x00000000, 1},
603 {0xFEDCBA76, 0xFEDCBA70, 1},
604 {0xFEDCBA70, 0xFEDCBA76, 0},
605 {0xFEDCBA76, 0xFEDC8A76, 1},
606 {0xFEDC8A76, 0xFEDCBA76, 0},
607 {0xFEDCBA76, 0xC8C4B242, 1},
608 {0xC8C4B242, 0xFEDCBA76, 0},
614 unsigned int test_num;
621 "(test %d): RtlAreAllAccessesGranted(%08lx, %08lx) returns %d, expected %d\n",
636 {0xFEDCBA76, 0xFEDCBA76, 1},
637 {0x00000000, 0xFEDCBA76, 0},
638 {0xFEDCBA76, 0x00000000, 0},
639 {0x00000000, 0x00000000, 0},
640 {0xFEDCBA76, 0x01234589, 0},
641 {0x00040000, 0xFEDCBA76, 1},
642 {0x00040000, 0xFED8BA76, 0},
643 {0xFEDCBA76, 0x00040000, 1},
644 {0xFED8BA76, 0x00040000, 0},
650 unsigned int test_num;
657 "(test %d): RtlAreAnyAccessesGranted(%08lx, %08lx) returns %d, expected %d\n",
669 ok(crc == 0x40861dc2,
"Expected 0x40861dc2, got %8lx\n", crc);
682 *AllocatedBit = *AllocatedBit | 1;
695 ok(MyHandle !=
NULL,
"RtlAllocateHandle failed\n");
699 ok(
result,
"Handle %p wasn't valid\n", MyHandle);
701 ok(
result,
"Couldn't free handle %p\n", MyHandle);
712 ret =
RtlAllocateAndInitializeSid(&sia, 0, 1, 2, 3, 4, 5, 6, 7, 8, &psid);
713 ok(!
ret,
"RtlAllocateAndInitializeSid error %08lx\n",
ret);
715 ok(!
ret,
"RtlFreeSid error %08lx\n",
ret);
720 RtlAllocateAndInitializeSid(
NULL, 0, 1, 2, 3, 4, 5, 6, 7, 8, &psid);
721 RtlAllocateAndInitializeSid(&sia, 0, 1, 2, 3, 4, 5, 6, 7, 8,
NULL);
724 ret =
RtlAllocateAndInitializeSid(&sia, 9, 1, 2, 3, 4, 5, 6, 7, 8, &psid);
735 "expected STATUS_INVALID_PARAMETER_1 or STATUS_INVALID_PARAMETER, got %lx\n",
ret);
745 if (!pRtlGetThreadErrorMode || !pRtlSetThreadErrorMode)
747 win_skip(
"RtlGetThreadErrorMode and/or RtlSetThreadErrorMode not available\n");
754 oldmode = pRtlGetThreadErrorMode();
759 "RtlSetThreadErrorMode failed with error 0x%08lx\n",
status);
761 "RtlSetThreadErrorMode returned mode 0x%lx, expected 0x%lx\n",
763 ok(pRtlGetThreadErrorMode() == 0x70,
764 "RtlGetThreadErrorMode returned 0x%lx, expected 0x%x\n",
mode, 0x70);
768 "The TEB contains 0x%lx, expected 0x%x\n",
775 "RtlSetThreadErrorMode failed with error 0x%08lx\n",
status);
777 "RtlSetThreadErrorMode returned mode 0x%lx, expected 0x%x\n",
779 ok(pRtlGetThreadErrorMode() == 0,
780 "RtlGetThreadErrorMode returned 0x%lx, expected 0x%x\n",
mode, 0);
784 "The TEB contains 0x%lx, expected 0x%x\n",
794 "RtlSetThreadErrorMode(%lx,NULL) failed with error 0x%08lx\n",
798 "RtlSetThreadErrorMode(%lx,NULL) returns 0x%08lx, "
799 "expected STATUS_INVALID_PARAMETER_1\n",
803 pRtlSetThreadErrorMode(oldmode,
NULL);
816 ok((
USHORT*)
ret == &reloc+1,
"ret = %p, expected %p\n",
ret, &reloc+1);
817 ok(addr32 == 0x550055,
"addr32 = %lx, expected 0x550055\n", addr32);
822 ok((
USHORT*)
ret == &reloc+1,
"ret = %p, expected %p\n",
ret, &reloc+1);
823 ok(addr16 == 0x555,
"addr16 = %x, expected 0x555\n", addr16);
828 ok((
USHORT*)
ret == &reloc+1,
"ret = %p, expected %p\n",
ret, &reloc+1);
829 ok(addr16 == 0x565,
"addr16 = %x, expected 0x565\n", addr16);
839 ip.S_un.S_un_b.s_b1 = 1;
840 ip.S_un.S_un_b.s_b2 = 2;
841 ip.S_un.S_un_b.s_b3 = 3;
842 ip.S_un.S_un_b.s_b4 = 4;
851 ok( (
res == (
char *)~0) ||
853 "got %p (expected ~0)\n",
res);
872 CHAR ip_1234[] =
"1.2.3.4";
873 CHAR ip_1234_80[] =
"1.2.3.4:80";
882 if (!pRtlIpv4AddressToStringExA)
884 win_skip(
"RtlIpv4AddressToStringExA not available\n");
888 ip.S_un.S_un_b.s_b1 = 1;
889 ip.S_un.S_un_b.s_b2 = 2;
890 ip.S_un.S_un_b.s_b3 = 3;
891 ip.S_un.S_un_b.s_b4 = 4;
918 "got 0x%lx and %ld with '%s' (expected STATUS_INVALID_PARAMETER and %ld)\n",
926 "got 0x%lx and %ld with '%s' (expected STATUS_INVALID_PARAMETER and %ld)\n",
956 "got 0x%lx and %ld with '%s' (expected STATUS_INVALID_PARAMETER and %ld)\n",
964 "got 0x%lx and %ld with '%s' (expected STATUS_INVALID_PARAMETER and %ld)\n",
973 "got 0x%lx with '%s' (expected STATUS_INVALID_PARAMETER)\n",
res,
buffer);
978 "got 0x%lx and size %ld (expected STATUS_INVALID_PARAMETER)\n",
res,
size);
985 "got 0x%lx and size %ld with '%s' (expected STATUS_INVALID_PARAMETER)\n",
995 enum { normal_4, strict_diff_4 = 1, ex_fail_4 = 2 }
flags;
1005 {
"255.255.255.255",
STATUS_SUCCESS, 15, { 255, 255, 255, 255 } },
1006 {
"255.255.255.255:123",
STATUS_SUCCESS, 15, { 255, 255, 255, 255 } },
1012 {
"1.1.1.0xaA",
STATUS_SUCCESS, 10, { 1, 1, 1, 170 }, strict_diff_4,
1014 {
"1.1.1.0XaA",
STATUS_SUCCESS, 10, { 1, 1, 1, 170 }, strict_diff_4,
1017 {
"1.1.1.0xff",
STATUS_SUCCESS, 10, { 1, 1, 1, 255 }, strict_diff_4,
1032 {
"1.1.1.008",
STATUS_SUCCESS, 8, { 1, 1, 1, 0 }, strict_diff_4 | ex_fail_4,
1050 {
"203569230",
STATUS_SUCCESS, 9, { 12, 34, 56, 78 }, strict_diff_4,
1052 {
"1.223756",
STATUS_SUCCESS, 8, { 1, 3, 106, 12 }, strict_diff_4,
1077 {
"0x00010203",
STATUS_SUCCESS, 10, { 0, 1, 2, 3 }, strict_diff_4,
1079 {
"0X00010203",
STATUS_SUCCESS, 10, { 0, 1, 2, 3 }, strict_diff_4,
1083 {
"0x123456789",
STATUS_SUCCESS, 11, { 35, 69, 103, 137 }, strict_diff_4,
1085 {
"0x00010Q03",
STATUS_SUCCESS, 7, { 0, 0, 0, 16 }, strict_diff_4 | ex_fail_4,
1088 {
"1234BEEF",
STATUS_SUCCESS, 4, { 0, 0, 4, 210 }, strict_diff_4 | ex_fail_4,
1090 {
"017700000001",
STATUS_SUCCESS, 12, { 127, 0, 0, 1 }, strict_diff_4,
1100 if (!
src ||
src[0] == -1)
1102 addr->S_un.S_addr = 0xabababab;
1106 addr->S_un.S_un_b.s_b1 =
src[0];
1107 addr->S_un.S_un_b.s_b2 =
src[1];
1108 addr->S_un.S_un_b.s_b3 =
src[2];
1109 addr->S_un.S_un_b.s_b4 =
src[3];
1138 terminator = &
dummy;
1139 ip.S_un.S_addr = 0xabababab;
1142 "[%s] res = 0x%08lx, expected 0x%08lx\n",
1145 "[%s] terminator = %p, expected %p\n",
1150 "[%s] ip = %08lx, expected %08lx\n",
1163 terminator = &
dummy;
1164 ip.S_un.S_addr = 0xabababab;
1167 "[%s] res = 0x%08lx, expected 0x%08lx\n",
1170 "[%s] terminator = %p, expected %p\n",
1175 "[%s] ip = %08lx, expected %08lx\n",
1215 if (!pRtlIpv4StringToAddressExA)
1217 win_skip(
"RtlIpv4StringToAddressEx not available\n");
1222 ip.S_un.S_addr = 0xabababab;
1227 ok(
ip.S_un.S_addr == 0xabababab,
"RtlIpv4StringToAddressExA should not touch the ip!, ip == %lx\n",
ip.S_un.S_addr);
1228 ok(
port == 0xdead,
"RtlIpv4StringToAddressExA should not touch the port!, port == %x\n",
port);
1234 ok(
port == 0xdead,
"RtlIpv4StringToAddressExA should not touch the port!, port == %x\n",
port);
1236 ip.S_un.S_addr = 0xabababab;
1241 ok(
ip.S_un.S_addr == 0xabababab,
"RtlIpv4StringToAddressExA should not touch the ip!, ip == %lx\n",
ip.S_un.S_addr);
1242 ok(
port == 0xdead,
"RtlIpv4StringToAddressExA should not touch the port!, port == %x\n",
port);
1251 ip.S_un.S_addr = 0xabababab;
1253 ok(
res == expect_res,
"[%s] res = 0x%08lx, expected 0x%08lx\n",
1257 ok(
ip.S_un.S_addr == expected_ip.
S_un.
S_addr,
"[%s] ip = %08lx, expected %08lx\n",
1272 ip.S_un.S_addr = 0xabababab;
1274 ok(
res == expect_res,
"[%s] res = 0x%08lx, expected 0x%08lx\n",
1278 ok(
ip.S_un.S_addr == expected_ip.
S_un.
S_addr,
"[%s] ip = %08lx, expected %08lx\n",
1288 ip.S_un.S_addr = 0xabababab;
1291 ok(
res == ipv4_ex_tests[
i].
res,
"[%s] res = 0x%08lx, expected 0x%08lx\n",
1295 ok(
ip.S_un.S_addr == expected_ip.
S_un.
S_addr,
"[%s] ip = %08lx, expected %08lx\n",
1296 ipv4_ex_tests[
i].address,
ip.S_un.S_addr, expected_ip.
S_un.
S_addr);
1297 ok(
port == ipv4_ex_tests[
i].
port,
"[%s] port = %u, expected %u\n",
1313 enum { normal_6, win_broken_6 = 1, ex_fail_6 = 2, ex_skip_6 = 4, win_extra_zero = 8 }
flags;
1317 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1319 { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
1321 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1323 { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
1325 { 0, 0, 0, 0, 0, 0, 0, 0 }, win_broken_6 },
1327 { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } },
1329 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1331 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1333 { 0, 0, 0, 0, 0, 0xffff, 0x9081, 0x2634 } },
1335 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1337 { 0, 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700 } },
1339 { 0x8010, 0, 0, 0, 0x800, 0x8, 0x0c20, 0x7a41 } },
1341 { 0, 0xa00, 0xb00, 0xc00, 0xd00, 0xe00, 0xf00, 0 }, win_broken_6 },
1342 {
"1111:2222:3333:4444:5555:6666:123.123.123.123",
STATUS_SUCCESS, 45,
1343 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1345 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 } },
1347 { 0x1111, 0x2222, 0x3333, 0x4444, 0xabab, 0xabab, 0xabab, 0xabab } },
1349 { 0x1111, 0x2222, 0x3333, 0x4444, 0xabab, 0xabab, 0xabab, 0xabab } },
1351 { 0x1111, 0x2222, 0x3333, 0x4444, 0xabab, 0xabab, 0xabab, 0xabab } },
1353 { 0x1111, 0x2222, 0x3333, 0x4444, 0xabab, 0xabab, 0xabab, 0xabab } },
1355 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0 }, win_broken_6 },
1357 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0, 0 } },
1359 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0, 0x8888 } },
1360 {
"1111:2222:3333:4444:5555:6666::7777:8888",
STATUS_SUCCESS, 35,
1361 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0, 0x7777 }, ex_fail_6 },
1362 {
"1111:2222:3333:4444:5555:6666:7777::8888",
STATUS_SUCCESS, 36,
1363 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0 }, ex_fail_6|win_broken_6 },
1365 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0 } },
1366 {
"1111:2222:3333:4444:5555::123.123.123.123",
STATUS_SUCCESS, 41,
1367 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0x7b7b, 0x7b7b } },
1368 {
"1111:2222:3333:4444:5555::0x1.123.123.123",
STATUS_SUCCESS, 27,
1369 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0x100 }, ex_fail_6 },
1371 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0x8800 }, ex_fail_6 },
1373 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0x8800 }, ex_fail_6 },
1375 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0 }, ex_fail_6 },
1377 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0x8800 }, ex_fail_6 },
1379 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0x8888 }, ex_fail_6 },
1381 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0xffff }, ex_fail_6 },
1383 { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0, 0x5555, 0x7856 }, ex_fail_6 },
1385 { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0, 0x5555, 0xffff }, ex_fail_6 },
1387 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0xabab, 0xabab }, ex_fail_6 },
1388 {
"1111:2222:3333:4444:5555:6666:7777:0x80000000",
STATUS_SUCCESS, 36,
1389 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0xffff }, ex_fail_6 },
1390 {
"1111:2222:3333:4444:5555:6666:7777:0x012345678",
STATUS_SUCCESS, 36,
1391 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x7856 }, ex_fail_6 },
1392 {
"1111:2222:3333:4444:5555:6666:7777:0x123456789",
STATUS_SUCCESS, 36,
1393 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0xffff }, ex_fail_6 },
1394 {
"111:222:333:444:555:666:777:0x123456789abcdef0",
STATUS_SUCCESS, 29,
1395 { 0x1101, 0x2202, 0x3303, 0x4404, 0x5505, 0x6606, 0x7707, 0xffff }, ex_fail_6 },
1397 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0xabab, 0xabab, 0xabab } },
1399 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0xabab, 0xabab, 0xabab } },
1401 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0xabab } },
1403 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0xabab, 0xabab } },
1405 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0xabab, 0xabab, 0xabab } },
1407 { 0x1111, 0x2222, 0x3333, 0x4444, 0xabab, 0xabab, 0xabab, 0xabab } },
1409 { 0x1111, 0x2222, 0x3333, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1411 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0x7777, 0x8888 } },
1413 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0x8888 } },
1415 { 0x1111, 0, 0, 0, 0, 0, 0, 0 } },
1417 { 0x1111, 0, 0, 0, 0, 0, 0x7b7b, 0x7b7b } },
1418 {
"1111::3333:4444:5555:6666:123.123.123.123",
STATUS_SUCCESS, 41,
1419 { 0x1111, 0, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1421 { 0x1111, 0, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 } },
1423 { 0x1111, 0, 0, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1425 { 0x1111, 0, 0, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 } },
1427 { 0x1111, 0, 0, 0, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1429 { 0x1111, 0, 0, 0, 0x5555, 0x6666, 0x7777, 0x8888 } },
1431 { 0x1111, 0, 0, 0, 0, 0x6666, 0x7b7b, 0x7b7b } },
1433 { 0x1111, 0, 0, 0, 0, 0x6666, 0x7777, 0x8888 } },
1435 { 0x1111, 0, 0, 0, 0, 0, 0x7777, 0x8888 } },
1437 { 0x1111, 0, 0, 0, 0, 0, 0, 0x8888 } },
1439 { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x201, 0x403 } },
1441 { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700, 0x800 } },
1443 { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0, 0 } },
1445 { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0, 0x800 } },
1447 { 0x120, 0, 0x3412, 0, 0, 0xc0c1, 0xcdab, 0x7608 } },
1449 { 0x120, 0, 0x3641, 0x78e3, 0x80, 0xbf63, 0xff3f, 0xd2fd } },
1451 { 0x120, 0xb80d, 0, 0, 0, 0, 0x2814, 0xab57 } },
1453 { 0x120, 0xb80d, 0x3412, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff } },
1455 { 0x120, 0, 0x49ce, 0x176, 0xad2c, 0xffdf, 0x947c, 0xfeff } },
1457 { 0x120, 0xb80d, 0xa385, 0, 0, 0x2e8a, 0x7003, 0x3473 } },
1459 { 0xfe3f, 0xb, 0, 0, 0x100, 0, 0, 0xa00 } },
1461 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1463 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1465 { 0, 0, 0, 0, 0, 0, 0, 0 }, ex_fail_6 },
1467 { 0, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1469 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1471 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1473 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1475 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1477 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1479 { 0, 0, 0, 0, 0, 0, 0, 0 } },
1483 { 0, 0, 0, 0, 0, 0, 0, 0 }, win_broken_6|win_extra_zero },
1485 { 0, 0, 0xa00, 0xb00, 0xc00, 0xd00, 0xe00, 0xf00 }, win_broken_6|win_extra_zero },
1487 { 0, 0, 0, 0, 0, 0, 0x7b7b, 0x7b7b } },
1489 { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff } },
1498 { 0x120, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1500 { 0x120, 0, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1502 { 0x120, 0, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1504 { 0x120, 0, 0, 0, 0, 0, 0, 0xb00 }, ex_fail_6 },
1506 { 0x120, 0, 0, 0, 0, 0, 0, 0xb00 }, ex_fail_6 },
1508 { 0x201, 0xab03, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1510 { 0x201, 0xab03, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1512 { 0x201, 0xab03, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1522 { 0x1111, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1524 { 0x1111, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1526 { 0x1111, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1528 { 0x1111, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1530 { 0x1111, 0x2222, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1532 { 0x1111, 0x2222, 0x201, 0xab03, 0xabab, 0xabab, 0xabab, 0xabab } },
1534 { 0x1111, 0x2222, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1536 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0, 0x100 }, ex_fail_6 },
1537 {
"1111:2222:3333:4444:5555:6666:7777:1.2.3.4",
STATUS_SUCCESS, 36,
1538 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x100 }, ex_fail_6 },
1539 {
"1111:2222:3333:4444:5555:6666:7777:8888:",
STATUS_SUCCESS, 39,
1540 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 }, ex_fail_6 },
1541 {
"1111:2222:3333:4444:5555:6666:7777:8888:1.2.3.4",
STATUS_SUCCESS, 39,
1542 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 }, ex_fail_6 },
1543 {
"1111:2222:3333:4444:5555:6666:7777:8888:9999",
STATUS_SUCCESS, 39,
1544 { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 }, ex_fail_6 },
1546 { 0x1111, 0x2222, 0, 0, 0, 0, 0, 0 }, ex_fail_6 },
1548 { 0x1111, 0x5555, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1550 { 0x1111, 0, 0, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777 }, ex_fail_6 },
1552 { 0x1111, 0x2222, 0, 0, 0, 0, 0, 0 }, ex_fail_6 },
1554 { 0x1111, 0, 0, 0, 0, 0, 0, 0x3333 }, ex_fail_6 },
1558 { 0x100, 0, 0, 0, 0, 0, 0x201, 0x403 } },
1560 { 0x100, 0, 0, 0, 0, 0, 0x201, 0x403 } },
1562 { 0x100, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1564 { 0x100, 0xab01, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1566 { 0x100, 0x201, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1568 { 0x100, 0x201, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1570 { 0x100, 0x201, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1572 { 0x100, 0x201, 0xab03, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1574 { 0x100, 0x201, 0xab03, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1576 { 0x100, 0x201, 0xab03, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1578 { 0x100, 0x201, 0xab03, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1580 { 0x100, 0x201, 0xab03, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1582 { 0x100, 0xab01, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1584 { 0x100, 0, 0, 0, 0, 0, 0x201, 0x403 }, ex_fail_6 },
1586 { 0x100, 0xab01, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1588 { 0x100, 0xab01, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1590 { 0x100, 0x201, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1592 { 0x100, 0x201, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1594 { 0x100, 0x201, 0xab03, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1596 { 0x100, 0, 0, 0, 0, 0, 0x201, 0x403 } },
1598 { 0x100, 0x201, 0xab03, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1600 { 0x100, 0x201, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1602 { 0x100, 0xab01, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1604 { 0x100, 0xab01, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1606 { 0x100, 0xab01, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1608 { 0x100, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1610 { 0x100, 0, 0, 0, 0, 0, 0, 0x1a00 }, ex_fail_6 },
1612 { 0x100, 0, 0, 0, 0, 0, 0, 0x200 }, ex_fail_6 },
1614 { 0x120, 0, 0x3412, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1615 {
"2001:0000:1234:0000:0000:C1C0:ABCD:0876 0",
STATUS_SUCCESS, 39,
1616 { 0x120, 0, 0x3412, 0, 0, 0xc0c1, 0xcdab, 0x7608 }, ex_fail_6 },
1618 { 0x120, 0x100, 0x100, 0x100, 0x100, 0x100, 0xabab, 0xabab } },
1620 { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff }, ex_fail_6 },
1630 { 0, 0, 0, 0, 0, 0, 0, 0 }, ex_fail_6 },
1632 { 0, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1634 { 0, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1636 { 0, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab, 0xabab } },
1638 { 0, 0, 0, 0, 0, 0, 0, 0xffff }, ex_fail_6 },
1640 { 0, 0, 0, 0, 0, 0, 0, 0x7856 }, ex_fail_6 },
1642 { 0, 0, 0, 0, 0, 0, 0, 0xffff }, ex_fail_6 },
1644 { 0, 0, 0, 0, 0, 0, 0, 0xffff }, ex_fail_6 },
1646 { 0, 0, 0, 0, 0, 0, 0, 0 }, ex_fail_6 },
1648 { 0, 0, 0, 0, 0, 0, 0, 0 }, ex_fail_6 },
1650 { 0, 0, 0, 0, 0, 0, 0, 0 }, ex_fail_6 },
1654 { -1 }, ex_skip_6 },
1660 if (!
src ||
src[0] == -1)
1662 for (
j = 0;
j < 8; ++
j)
1663 addr->s6_words[
j] = 0xabab;
1667 for (
j = 0;
j < 8; ++
j)
1685 {
"::13.1.68.3", { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } },
1686 {
"::123.123.123.123", { 0, 0, 0, 0, 0, 0, 0x7b7b, 0x7b7b } },
1687 {
"::ffff", { 0, 0, 0, 0, 0, 0, 0, 0xffff } },
1688 {
"::0.1.0.0", { 0, 0, 0, 0, 0, 0, 0x100, 0 } },
1689 {
"::ffff:13.1.68.3", { 0, 0, 0, 0, 0, 0xffff, 0x10d, 0x344 } },
1690 {
"::feff:d01:4403", { 0, 0, 0, 0, 0, 0xfffe, 0x10d, 0x344 } },
1691 {
"::fffe:d01:4403", { 0, 0, 0, 0, 0, 0xfeff, 0x10d, 0x344 } },
1692 {
"::100:d01:4403", { 0, 0, 0, 0, 0, 1, 0x10d, 0x344 } },
1693 {
"::1:d01:4403", { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } },
1694 {
"::1:0:d01:4403", { 0, 0, 0, 0, 0x100, 0, 0x10d, 0x344 } },
1695 {
"::fffe:d01:4403", { 0, 0, 0, 0, 0, 0xfeff, 0x10d, 0x344 } },
1696 {
"::fffe:0:d01:4403", { 0, 0, 0, 0, 0xfeff, 0, 0x10d, 0x344 } },
1697 {
"::ffff:0:4403", { 0, 0, 0, 0, 0, 0xffff, 0, 0x344 } },
1698 {
"::ffff:0.1.0.0", { 0, 0, 0, 0, 0, 0xffff, 0x100, 0 } },
1699 {
"::ffff:13.1.0.0", { 0, 0, 0, 0, 0, 0xffff, 0x10d, 0 } },
1700 {
"::ffff:0:0", { 0, 0, 0, 0, 0, 0xffff, 0, 0 } },
1701 {
"::ffff:0:ffff", { 0, 0, 0, 0, 0, 0xffff, 0, 0xffff } },
1702 {
"::ffff:0:0.1.0.0", { 0, 0, 0, 0, 0xffff, 0, 0x100, 0 } },
1703 {
"::ffff:0:13.1.68.3", { 0, 0, 0, 0, 0xffff, 0, 0x10d, 0x344 } },
1704 {
"::ffff:ffff:d01:4403", { 0, 0, 0, 0, 0xffff, 0xffff, 0x10d, 0x344 } },
1705 {
"::ffff:0:0:d01:4403", { 0, 0, 0, 0xffff, 0, 0, 0x10d, 0x344 } },
1706 {
"::ffff:255.255.255.255", { 0, 0, 0, 0, 0, 0xffff, 0xffff, 0xffff } },
1707 {
"::ffff:129.144.52.38", { 0, 0, 0, 0, 0, 0xffff, 0x9081, 0x2634 } },
1708 {
"::5efe:0.0.0.0", { 0, 0, 0, 0, 0, 0xfe5e, 0, 0 } },
1709 {
"::5efe:129.144.52.38", { 0, 0, 0, 0, 0, 0xfe5e, 0x9081, 0x2634 } },
1710 {
"1111:2222:3333:4444:0:5efe:129.144.52.38", { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } },
1711 {
"1111:2222:3333::5efe:129.144.52.38", { 0x1111, 0x2222, 0x3333, 0, 0, 0xfe5e, 0x9081, 0x2634 } },
1712 {
"1111:2222::5efe:129.144.52.38", { 0x1111, 0x2222, 0, 0, 0, 0xfe5e, 0x9081, 0x2634 } },
1713 {
"1111::5efe:129.144.52.38", { 0x1111, 0, 0, 0, 0, 0xfe5e, 0x9081, 0x2634 } },
1714 {
"::300:5efe:8190:3426", { 0, 0, 0, 0, 3, 0xfe5e, 0x9081, 0x2634 } },
1715 {
"::200:5efe:129.144.52.38", { 0, 0, 0, 0, 2, 0xfe5e, 0x9081, 0x2634 } },
1716 {
"::100:5efe:8190:3426", { 0, 0, 0, 0, 1, 0xfe5e, 0x9081, 0x2634 } },
1718 {
"::1", { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
1719 {
"::2", { 0, 0, 0, 0, 0, 0, 0, 0x200 } },
1720 {
"0:1:2:3:4:5:6:7", { 0, 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700 } },
1721 {
"1080::8:800:200c:417a", { 0x8010, 0, 0, 0, 0x800, 0x8, 0x0c20, 0x7a41 } },
1722 {
"1111:2222:3333:4444:5555:6666:7b7b:7b7b", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1723 {
"1111:2222:3333:4444:5555:6666:7777:8888", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 } },
1724 {
"1111:2222:3333:4444:5555:6666::", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0, 0 } },
1725 {
"1111:2222:3333:4444:5555:6666:0:8888", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0, 0x8888 } },
1726 {
"1111:2222:3333:4444:5555::", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0 } },
1727 {
"1111:2222:3333:4444:5555:0:7b7b:7b7b", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0x7b7b, 0x7b7b } },
1728 {
"1111:2222:3333:4444:5555:0:7777:8888", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0x7777, 0x8888 } },
1729 {
"1111:2222:3333:4444:5555::8888", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0, 0, 0x8888 } },
1730 {
"1111::", { 0x1111, 0, 0, 0, 0, 0, 0, 0 } },
1731 {
"1111::7b7b:7b7b", { 0x1111, 0, 0, 0, 0, 0, 0x7b7b, 0x7b7b } },
1732 {
"1111:0:3333:4444:5555:6666:7b7b:7b7b", { 0x1111, 0, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1733 {
"1111:0:3333:4444:5555:6666:7777:8888", { 0x1111, 0, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 } },
1734 {
"1111::4444:5555:6666:7b7b:7b7b", { 0x1111, 0, 0, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1735 {
"1111::4444:5555:6666:7777:8888", { 0x1111, 0, 0, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 } },
1736 {
"1111::5555:6666:7b7b:7b7b", { 0x1111, 0, 0, 0, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1737 {
"1111::5555:6666:7777:8888", { 0x1111, 0, 0, 0, 0x5555, 0x6666, 0x7777, 0x8888 } },
1738 {
"1111::6666:7b7b:7b7b", { 0x1111, 0, 0, 0, 0, 0x6666, 0x7b7b, 0x7b7b } },
1739 {
"1111::6666:7777:8888", { 0x1111, 0, 0, 0, 0, 0x6666, 0x7777, 0x8888 } },
1740 {
"1111::7777:8888", { 0x1111, 0, 0, 0, 0, 0, 0x7777, 0x8888 } },
1741 {
"1111::8888", { 0x1111, 0, 0, 0, 0, 0, 0, 0x8888 } },
1742 {
"1:2:3:4:5:6:102:304", { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x201, 0x403 } },
1743 {
"1:2:3:4:5:6:7:8", { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700, 0x800 } },
1744 {
"1:2:3:4:5:6::", { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0, 0 } },
1745 {
"1:2:3:4:5:6:0:8", { 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0, 0x800 } },
1746 {
"2001:0:1234::c1c0:abcd:876", { 0x120, 0, 0x3412, 0, 0, 0xc0c1, 0xcdab, 0x7608 } },
1747 {
"2001:0:4136:e378:8000:63bf:3fff:fdd2", { 0x120, 0, 0x3641, 0x78e3, 0x80, 0xbf63, 0xff3f, 0xd2fd } },
1748 {
"2001:db8::1428:57ab", { 0x120, 0xb80d, 0, 0, 0, 0, 0x2814, 0xab57 } },
1749 {
"2001:db8:1234:ffff:ffff:ffff:ffff:ffff", { 0x120, 0xb80d, 0x3412, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff } },
1750 {
"2001:0:ce49:7601:2cad:dfff:7c94:fffe", { 0x120, 0, 0x49ce, 0x176, 0xad2c, 0xffdf, 0x947c, 0xfeff } },
1751 {
"2001:db8:85a3::8a2e:370:7334", { 0x120, 0xb80d, 0xa385, 0, 0, 0x2e8a, 0x7003, 0x3473 } },
1752 {
"3ffe:b00::1:0:0:a", { 0xfe3f, 0xb, 0, 0, 0x100, 0, 0, 0xa00 } },
1753 {
"::a:b:c:d:e", { 0, 0, 0, 0xa00, 0xb00, 0xc00, 0xd00, 0xe00 } },
1754 {
"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff } },
1755 {
"1111:2222:3333:4444:5555:6666:7777:1", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x100 } },
1756 {
"1111:2222:3333:4444:5555:6666:7777:8888", { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888 } },
1757 {
"1111:2222::", { 0x1111, 0x2222, 0, 0, 0, 0, 0, 0 } },
1758 {
"1111::3333:4444:5555:6666:7777", { 0x1111, 0, 0, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777 } },
1759 {
"1111:2222::", { 0x1111, 0x2222, 0, 0, 0, 0, 0, 0 } },
1760 {
"1111::3333", { 0x1111, 0, 0, 0, 0, 0, 0, 0x3333 } },
1761 {
"2001:0:1234::c1c0:abcd:876", { 0x120, 0, 0x3412, 0, 0, 0xc0c1, 0xcdab, 0x7608 } },
1762 {
"2001::ffd3", { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } },
1791 "expected data at buffer[45] to always be NULL\n");
1792 ok(
buffer[46] ==
'#',
"expected data at buffer[46] not to change\n");
1811 {
"::13.1.68.3", 0, 0, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } },
1812 {
"::13.1.68.3%1", 1, 0, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } },
1813 {
"::13.1.68.3%4294949819", 0xffffbbbb, 0, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } },
1814 {
"[::13.1.68.3%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } },
1815 {
"[::13.1.68.3%4294949819]:256", 0xffffbbbb, 1, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } },
1816 {
"[::13.1.68.3]:256", 0, 1, { 0, 0, 0, 0, 0, 0, 0x10d, 0x344 } },
1818 {
"::1:d01:4403", 0, 0, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } },
1819 {
"::1:d01:4403%1", 1, 0, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } },
1820 {
"::1:d01:4403%4294949819", 0xffffbbbb, 0, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } },
1821 {
"[::1:d01:4403%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } },
1822 {
"[::1:d01:4403%4294949819]:256", 0xffffbbbb, 1, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } },
1823 {
"[::1:d01:4403]:256", 0, 1, { 0, 0, 0, 0, 0, 0x100, 0x10d, 0x344 } },
1825 {
"1111:2222:3333:4444:0:5efe:129.144.52.38", 0, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } },
1826 {
"1111:2222:3333:4444:0:5efe:129.144.52.38%1", 1, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } },
1827 {
"1111:2222:3333:4444:0:5efe:129.144.52.38%4294949819", 0xffffbbbb, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } },
1828 {
"[1111:2222:3333:4444:0:5efe:129.144.52.38%4294949819]:65518",0xffffbbbb, 0xeeff, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } },
1829 {
"[1111:2222:3333:4444:0:5efe:129.144.52.38%4294949819]:256", 0xffffbbbb, 1, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } },
1830 {
"[1111:2222:3333:4444:0:5efe:129.144.52.38]:256", 0, 1, { 0x1111, 0x2222, 0x3333, 0x4444, 0, 0xfe5e, 0x9081, 0x2634 } },
1832 {
"::1", 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
1833 {
"::1%1", 1, 0, { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
1834 {
"::1%4294949819", 0xffffbbbb, 0, { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
1835 {
"[::1%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
1836 {
"[::1%4294949819]:256", 0xffffbbbb, 1, { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
1837 {
"[::1]:256", 0, 1, { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
1839 {
"1111:2222:3333:4444:5555:6666:7b7b:7b7b", 0, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1840 {
"1111:2222:3333:4444:5555:6666:7b7b:7b7b%1", 1, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1841 {
"1111:2222:3333:4444:5555:6666:7b7b:7b7b%4294949819", 0xffffbbbb, 0, { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1842 {
"[1111:2222:3333:4444:5555:6666:7b7b:7b7b%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1843 {
"[1111:2222:3333:4444:5555:6666:7b7b:7b7b%4294949819]:256", 0xffffbbbb, 1, { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1844 {
"[1111:2222:3333:4444:5555:6666:7b7b:7b7b]:256", 0, 1, { 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7b7b, 0x7b7b } },
1846 {
"1111::", 0, 0, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } },
1847 {
"1111::%1", 1, 0, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } },
1848 {
"1111::%4294949819", 0xffffbbbb, 0, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } },
1849 {
"[1111::%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } },
1850 {
"[1111::%4294949819]:256", 0xffffbbbb, 1, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } },
1851 {
"[1111::]:256", 0, 1, { 0x1111, 0, 0, 0, 0, 0, 0, 0 } },
1853 {
"2001::ffd3", 0, 0, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } },
1854 {
"2001::ffd3%1", 1, 0, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } },
1855 {
"2001::ffd3%4294949819", 0xffffbbbb, 0, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } },
1856 {
"[2001::ffd3%4294949819]:65518", 0xffffbbbb, 0xeeff, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } },
1857 {
"[2001::ffd3%4294949819]:256", 0xffffbbbb, 1, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } },
1858 {
"[2001::ffd3]:256", 0, 1, { 0x120, 0, 0, 0, 0, 0, 0, 0xd3ff } },
1862 if (!pRtlIpv6AddressToStringExA)
1864 win_skip(
"RtlIpv6AddressToStringExA not available\n");
1876 "got len %ld with '%s' (expected 3 with '::')\n",
len,
buffer);
1886 res = pRtlIpv6AddressToStringExA(&
ip, 0, 0,
NULL, &
len);
1897 ok(
buffer[0] ==
'#',
"got first char %c (expected '#')\n",
buffer[0]);
1898 ok(
len == 3,
"got len %ld (expected len 3)\n",
len);
1926 terminator = (
void *)0xdeadbeef;
1928 ok(
res == res_a,
"[W:%s] res = 0x%08lx, expected 0x%08lx\n", name_a,
res, res_a);
1930 if (terminator_offset_a < 0)
1932 ok(terminator == (
void *)0xdeadbeef,
1933 "[W:%s] terminator = %p, expected it not to change\n",
1934 name_a, terminator);
1938 ok(terminator ==
name + terminator_offset_a,
1939 "[W:%s] terminator = %p, expected %p\n",
1940 name_a, terminator,
name + terminator_offset_a);
1944 "[W:%s] ip = %x:%x:%x:%x:%x:%x:%x:%x, expected %x:%x:%x:%x:%x:%x:%x:%x\n",
1946 ip.s6_words[0],
ip.s6_words[1],
ip.s6_words[2],
ip.s6_words[3],
1947 ip.s6_words[4],
ip.s6_words[5],
ip.s6_words[6],
ip.s6_words[7],
1948 addr_a->s6_words[0], addr_a->s6_words[1], addr_a->s6_words[2], addr_a->s6_words[3],
1949 addr_a->s6_words[4], addr_a->s6_words[5], addr_a->s6_words[6], addr_a->s6_words[7]);
1973 ok(
sizeof(
ip) ==
sizeof(
USHORT)* 8,
"sizeof(ip)\n");
1978 terminator = (
void *)0xdeadbeef;
1986 "[%s] res = 0x%08lx, expected 0x%08lx\n",
1995 "[%s] res = 0x%08lx, expected 0x%08lx\n",
2001 ok(terminator == (
void *)0xdeadbeef,
2002 "[%s] terminator = %p, expected it not to change\n",
2010 "[%s] terminator = %p, expected %p\n",
2014 "[%s] terminator = %p, expected %p\n",
2021 "[%s] ip = %x:%x:%x:%x:%x:%x:%x:%x, expected %x:%x:%x:%x:%x:%x:%x:%x\n",
2023 ip.s6_words[4],
ip.s6_words[5],
ip.s6_words[6],
ip.s6_words[7],
2024 expected_ip.s6_words[0], expected_ip.s6_words[1], expected_ip.s6_words[2], expected_ip.s6_words[3],
2025 expected_ip.s6_words[4], expected_ip.s6_words[5], expected_ip.s6_words[6], expected_ip.s6_words[7]);
2028 "[%s] ip = %x:%x:%x:%x:%x:%x:%x:%x, expected %x:%x:%x:%x:%x:%x:%x:%x\n",
2030 ip.s6_words[4],
ip.s6_words[5],
ip.s6_words[6],
ip.s6_words[7],
2031 expected_ip.s6_words[0], expected_ip.s6_words[1], expected_ip.s6_words[2], expected_ip.s6_words[3],
2032 expected_ip.s6_words[4], expected_ip.s6_words[5], expected_ip.s6_words[6], expected_ip.s6_words[7]);
2041 ULONG scope = 0xbadf00d;
2044 if (!pRtlIpv6StringToAddressExW)
2052 ok(
res == res_a,
"[W:%s] res = 0x%08lx, expected 0x%08lx\n", name_a,
res, res_a);
2053 ok(scope == scope_a,
"[W:%s] scope = 0x%08lx, expected 0x%08lx\n", name_a, scope, scope_a);
2054 ok(
port == port_a,
"[W:%s] port = 0x%08x, expected 0x%08x\n", name_a,
port, port_a);
2057 "[W:%s] ip = %x:%x:%x:%x:%x:%x:%x:%x, expected %x:%x:%x:%x:%x:%x:%x:%x\n",
2059 ip.s6_words[0],
ip.s6_words[1],
ip.s6_words[2],
ip.s6_words[3],
2060 ip.s6_words[4],
ip.s6_words[5],
ip.s6_words[6],
ip.s6_words[7],
2061 addr_a->s6_words[0], addr_a->s6_words[1], addr_a->s6_words[2], addr_a->s6_words[3],
2062 addr_a->s6_words[4], addr_a->s6_words[5], addr_a->s6_words[6], addr_a->s6_words[7]);
2081 { 0, 0, 0, 0, 0, 0, 0, 0 } },
2083 { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
2085 { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
2087 { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
2089 { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
2091 { 0, 0, 0, 0, 0, 0, 0, 0x100 } },
2092 {
"[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80",
STATUS_SUCCESS, 0, 0x5000,
2093 { 0xdcfe, 0x98ba, 0x5476, 0x1032, 0xdcfe, 0x98ba, 0x5476, 0x1032 } },
2094 {
"[1080:0:0:0:8:800:200C:417A]:1234",
STATUS_SUCCESS, 0, 0xd204,
2095 { 0x8010, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2097 { 0xfe3f, 0x2a, 1, 0x3170, 0, 0, 0, 0x100 } },
2101 { 0xfe3f, 0x2a, 1, 0x3170, 0, 0, 0, 0x100 } },
2103 { 0xfe3f, 0x2a, 1, 0x3170, 0, 0, 0, 0x100 } },
2105 { 0x8010, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2107 { 0x8010, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2109 { 0, 0, 0, 0, 0, 0xffff, 0x9081, 0x2634 } },
2111 { 0, 0, 0, 0, 0, 0xffff, 0x9081, 0x2634 } },
2113 { 0, 0, 0, 0, 0, 0xffff, 0x9081, 0x2634 } },
2115 { 0, 0, 0, 0, 0, 0xffff, 0x9081, 0x2634 } },
2117 { 0, 0, 0, 0, 0, 0xffff, 0x9081, 0x2634 } },
2121 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2122 {
"[ff01::8:800:200C:417A%100]:8080",
STATUS_SUCCESS, 100, 0x901f,
2123 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2124 {
"[ff01::8:800:200C:417A%1000]:8080",
STATUS_SUCCESS, 1000, 0x901f,
2125 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2126 {
"[ff01::8:800:200C:417A%10000]:8080",
STATUS_SUCCESS, 10000, 0x901f,
2127 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2128 {
"[ff01::8:800:200C:417A%1000000]:8080",
STATUS_SUCCESS, 1000000, 0x901f,
2129 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2130 {
"[ff01::8:800:200C:417A%4294967295]:8080",
STATUS_SUCCESS, 0xffffffff, 0x901f,
2131 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2133 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2135 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2137 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2139 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2141 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2143 { 0x1ff, 0, 0, 0, 0x800, 8, 0xc20, 0x7a41 } },
2145 const char *simple_ip =
"::";
2148 if (!pRtlIpv6StringToAddressExW)
2150 win_skip(
"RtlIpv6StringToAddressExW not available\n");
2154 if (!pRtlIpv6StringToAddressExA)
2156 win_skip(
"RtlIpv6StringToAddressExA not available\n");
2160 res = pRtlIpv6StringToAddressExA(simple_ip, &
ip, &scope, &
port);
2169 "[null string] res = 0x%08lx, expected STATUS_INVALID_PARAMETER\n",
res);
2170 ok(scope == 0xbadf00d,
"[null string] scope = 0x%08lx, expected 0xbadf00d\n", scope);
2171 ok(
port == 0xbeef,
"[null string] port = 0x%08x, expected 0xbeef\n",
port);
2173 "[null string] ip is changed, expected it not to change\n");
2179 res = pRtlIpv6StringToAddressExA(simple_ip,
NULL, &scope, &
port);
2181 "[null result] res = 0x%08lx, expected STATUS_INVALID_PARAMETER\n",
res);
2182 ok(scope == 0xbadf00d,
"[null result] scope = 0x%08lx, expected 0xbadf00d\n", scope);
2183 ok(
port == 0xbeef,
"[null result] port = 0x%08x, expected 0xbeef\n",
port);
2185 "[null result] ip is changed, expected it not to change\n");
2190 res = pRtlIpv6StringToAddressExA(simple_ip, &
ip,
NULL, &
port);
2192 "[null scope] res = 0x%08lx, expected STATUS_INVALID_PARAMETER\n",
res);
2193 ok(scope == 0xbadf00d,
"[null scope] scope = 0x%08lx, expected 0xbadf00d\n", scope);
2194 ok(
port == 0xbeef,
"[null scope] port = 0x%08x, expected 0xbeef\n",
port);
2196 "[null scope] ip is changed, expected it not to change\n");
2201 res = pRtlIpv6StringToAddressExA(simple_ip, &
ip, &scope,
NULL);
2203 "[null port] res = 0x%08lx, expected STATUS_INVALID_PARAMETER\n",
res);
2204 ok(scope == 0xbadf00d,
"[null port] scope = 0x%08lx, expected 0xbadf00d\n", scope);
2205 ok(
port == 0xbeef,
"[null port] port = 0x%08x, expected 0xbeef\n",
port);
2207 "[null port] ip is changed, expected it not to change\n");
2210 ok(
sizeof(
ip) ==
sizeof(
USHORT)* 8,
"sizeof(ip)\n");
2215 ULONG scope = 0xbadf00d;
2229 ok(scope == 0xbadf00d,
"[%s] scope = 0x%08lx, expected 0xbadf00d\n",
2231 ok(
port == 0xbeef,
"[%s] port = 0x%08x, expected 0xbeef\n",
2236 ok(scope != 0xbadf00d,
"[%s] scope = 0x%08lx, not expected 0xbadf00d\n",
2238 ok(
port != 0xbeef,
"[%s] port = 0x%08x, not expected 0xbeef\n",
2252 ok(
res == expect_ret,
"[%s] res = 0x%08lx, expected 0x%08lx\n",
2258 if (
res == expect_ret)
2262 "[%s] ip = %x:%x:%x:%x:%x:%x:%x:%x, expected %x:%x:%x:%x:%x:%x:%x:%x\n",
2264 ip.s6_words[0],
ip.s6_words[1],
ip.s6_words[2],
ip.s6_words[3],
2265 ip.s6_words[4],
ip.s6_words[5],
ip.s6_words[6],
ip.s6_words[7],
2266 expected_ip.s6_words[0], expected_ip.s6_words[1], expected_ip.s6_words[2], expected_ip.s6_words[3],
2267 expected_ip.s6_words[4], expected_ip.s6_words[5], expected_ip.s6_words[6], expected_ip.s6_words[7]);
2280 ok(
res == ipv6_ex_tests[
i].
res,
"[%s] res = 0x%08lx, expected 0x%08lx\n",
2282 ok(scope == ipv6_ex_tests[
i].scope,
"[%s] scope = 0x%08lx, expected 0x%08lx\n",
2283 ipv6_ex_tests[
i].
address, scope, ipv6_ex_tests[
i].scope);
2284 ok(
port == ipv6_ex_tests[
i].
port,
"[%s] port = 0x%08x, expected 0x%08x\n",
2289 "[%s] ip = %x:%x:%x:%x:%x:%x:%x:%x, expected %x:%x:%x:%x:%x:%x:%x:%x\n",
2291 ip.s6_words[0],
ip.s6_words[1],
ip.s6_words[2],
ip.s6_words[3],
2292 ip.s6_words[4],
ip.s6_words[5],
ip.s6_words[6],
ip.s6_words[7],
2293 expected_ip.s6_words[0], expected_ip.s6_words[1], expected_ip.s6_words[2], expected_ip.s6_words[3],
2294 expected_ip.s6_words[4], expected_ip.s6_words[5], expected_ip.s6_words[6], expected_ip.s6_words[7]);
2359 ok(magic == 0,
"got %Ix\n", magic);
2364 ok(magic == 0,
"got %Ix\n", magic);
2375 ok(magic == 0,
"got %Ix\n", magic);
2389 ok(magic != 0,
"got %Ix\n", magic);
2395 ULONG compress_workspace, decompress_workspace;
2397 static UCHAR buf1[0x1000], buf2[0x1000];
2398 ULONG final_size, buf_size;
2402 compress_workspace = decompress_workspace = 0xdeadbeef;
2404 &decompress_workspace);
2406 ok(compress_workspace != 0,
"got wrong compress_workspace %lu\n", compress_workspace);
2411 final_size = 0xdeadbeef;
2413 buf1,
sizeof(buf1) - 1, 4096, &final_size, workspace);
2415 ok(final_size == 0xdeadbeef,
"got wrong final_size %lu\n", final_size);
2417 final_size = 0xdeadbeef;
2419 buf1,
sizeof(buf1) - 1, 4096, &final_size, workspace);
2421 ok(final_size == 0xdeadbeef,
"got wrong final_size %lu\n", final_size);
2423 final_size = 0xdeadbeef;
2425 buf1,
sizeof(buf1) - 1, 4096, &final_size, workspace);
2427 ok(final_size == 0xdeadbeef,
"got wrong final_size %lu\n", final_size);
2430 final_size = 0xdeadbeef;
2431 memset(buf1, 0x11,
sizeof(buf1));
2433 buf1,
sizeof(buf1), 4096, &final_size, workspace);
2435 ok((*(
WORD *)buf1 & 0x7000) == 0x3000,
"no chunk signature found %04x\n", *(
WORD *)buf1);
2437 ok(final_size <
sizeof(
test_buffer),
"got wrong final_size %lu\n", final_size);
2440 buf_size = final_size;
2441 final_size = 0xdeadbeef;
2442 memset(buf2, 0x11,
sizeof(buf2));
2444 buf1, buf_size, &final_size);
2446 ok(final_size ==
sizeof(
test_buffer),
"got wrong final_size %lu\n", final_size);
2448 ok(buf2[
sizeof(
test_buffer)] == 0x11,
"too many bytes written\n");
2451 final_size = 0xdeadbeef;
2452 memset(buf1, 0x11,
sizeof(buf1));
2454 buf1, 4, 4096, &final_size, workspace);
2462 ULONG compress_workspace, decompress_workspace;
2467 &decompress_workspace);
2471 &decompress_workspace);
2478 compress_workspace = decompress_workspace = 0xdeadbeef;
2480 &decompress_workspace);
2482 ok(compress_workspace != 0,
"got wrong compress_workspace %lu\n", compress_workspace);
2483 ok(decompress_workspace == 0x1000,
"got wrong decompress_workspace %lu\n", decompress_workspace);
2485 compress_workspace = decompress_workspace = 0xdeadbeef;
2487 &compress_workspace, &decompress_workspace);
2489 ok(compress_workspace != 0,
"got wrong compress_workspace %lu\n", compress_workspace);
2490 ok(decompress_workspace == 0x1000,
"got wrong decompress_workspace %lu\n", decompress_workspace);
2498 if (compressed_size <=
sizeof(
WORD))
2501 while (compressed_size >=
sizeof(
WORD))
2503 chunk_size = (*(
WORD *)compressed & 0xFFF) + 1;
2504 if (compressed_size <
sizeof(
WORD) + chunk_size)
2508 compressed +=
sizeof(
WORD) + chunk_size;
2509 compressed_size -=
sizeof(
WORD) + chunk_size;
2515#define DECOMPRESS_BROKEN_FRAGMENT 1
2516#define DECOMPRESS_BROKEN_TRUNCATED 2
2522 UCHAR compressed[32];
2523 ULONG compressed_size;
2526 ULONG uncompressed_size;
2533 {0x03, 0x30,
'W',
'i',
'n',
'e'},
2542 {0x07, 0x30,
'W',
'i',
'n',
'e',
'W',
'i',
'n',
'e'},
2551 {0x04, 0xB0, 0x00,
'W',
'i',
'n',
'e'},
2559 {0x08, 0xB0, 0x00,
'W',
'i',
'n',
'e',
'W',
'i',
'n',
'e'},
2567 {0x06, 0xB0, 0x10,
'W',
'i',
'n',
'e', 0x01, 0x30},
2576 {0x06, 0xB0, 0x10,
'W',
'i',
'n',
'e', 0x05, 0x30},
2585 {0x06, 0xB0, 0x30,
'W',
'i',
'n',
'e', 0x01, 0x30},
2594 {0x01, 0xB0, 0x02,
'W'},
2602 {0x03, 0x30,
'W',
'i',
'n',
'e', 0x00, 0x00, 0x03, 0x30,
'W',
'i',
'n',
'e'},
2611 {0x14, 0xB0, 0x00,
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
2612 0x00,
'I',
'J',
'K',
'L',
'M',
'N',
'O',
'P',
2616 "ABCDEFGHIJKLMNOPABCD",
2622 {0x15, 0xB0, 0x00,
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
2623 0x00,
'I',
'J',
'K',
'L',
'M',
'N',
'O',
'P',
2624 0x02,
'A', 0x00, 0x78},
2627 "ABCDEFGHIJKLMNOPABCD",
2633 {0x03, 0x20,
'W',
'i',
'n',
'e'},
2642 {0x04, 0xA0, 0x00,
'W',
'i',
'n',
'e'},
2650 {0x00, 0xB0, 0x02, 0x01},
2692 {0x06, 0xB0, 0x10,
'W',
'i',
'n',
'e', 0x05, 0x40},
2698 {0x05, 0xB0, 0x10,
'W',
'i',
'n',
'e', 0x05},
2704 {0x07, 0x30,
'W',
'i',
'n',
'e'},
2710 {0x08, 0xB0, 0x00,
'W',
'i',
'n',
'e'},
2716 {0x00, 0xB0, 0x02, 0x00, 0xB0},
2722 static UCHAR buf[0x2000], workspace[0x1000];
2728 final_size = 0xdeadbeef;
2730 test_lznt[0].compressed_size, &final_size);
2732 ok(final_size == 0xdeadbeef,
"got wrong final_size %lu\n", final_size);
2734 final_size = 0xdeadbeef;
2736 test_lznt[0].compressed_size, &final_size);
2738 ok(final_size == 0xdeadbeef,
"got wrong final_size %lu\n", final_size);
2740 final_size = 0xdeadbeef;
2742 test_lznt[0].compressed_size, &final_size);
2744 ok(final_size == 0xdeadbeef,
"got wrong final_size %lu\n", final_size);
2749 trace(
"Running test %d (compressed_size=%lu, uncompressed_size=%lu, status=0x%08lx)\n",
2750 i, test_lznt[
i].compressed_size, test_lznt[
i].uncompressed_size, test_lznt[
i].
status);
2753 final_size = 0xdeadbeef;
2756 test_lznt[
i].compressed_size, &final_size);
2761 ok(final_size == test_lznt[
i].uncompressed_size,
2762 "%d: got wrong final_size %lu\n",
i, final_size);
2764 "%d: got wrong decoded data\n",
i);
2765 ok(
buf[test_lznt[
i].uncompressed_size] == 0x11,
2766 "%d: buf[%lu] was modified\n",
i, test_lznt[
i].uncompressed_size);
2770 final_size = 0xdeadbeef;
2773 test_lznt[
i].compressed, test_lznt[
i].compressed_size, &final_size);
2778 ok(final_size == test_lznt[
i].uncompressed_size,
2779 "%d: got wrong final_size %lu\n",
i, final_size);
2781 "%d: got wrong decoded data\n",
i);
2782 ok(
buf[test_lznt[
i].uncompressed_size] == 0x11,
2783 "%d: buf[%lu] was modified\n",
i, test_lznt[
i].uncompressed_size);
2787 if (test_lznt[
i].uncompressed_size > 0)
2789 final_size = 0xdeadbeef;
2792 test_lznt[
i].compressed, test_lznt[
i].compressed_size, &final_size);
2796 ok(final_size == test_lznt[
i].uncompressed_size,
2797 "%d: got wrong final_size %lu\n",
i, final_size);
2799 "%d: got wrong decoded data\n",
i);
2800 ok(
buf[test_lznt[
i].uncompressed_size] == 0x11,
2801 "%d: buf[%lu] was modified\n",
i, test_lznt[
i].uncompressed_size);
2806 if (test_lznt[
i].uncompressed_size > 1)
2808 final_size = 0xdeadbeef;
2811 test_lznt[
i].compressed, test_lznt[
i].compressed_size, &final_size);
2814 "%d: got wrong status 0x%08lx\n",
i,
status);
2817 ok(final_size == test_lznt[
i].uncompressed_size - 1,
2818 "%d: got wrong final_size %lu\n",
i, final_size);
2820 "%d: got wrong decoded data\n",
i);
2821 ok(
buf[test_lznt[
i].uncompressed_size - 1] == 0x11,
2822 "%d: buf[%lu] was modified\n",
i, test_lznt[
i].uncompressed_size - 1);
2827 final_size = 0xdeadbeef;
2830 test_lznt[
i].compressed_size, &final_size);
2836 ok(final_size == 0,
"%d: got wrong final_size %lu\n",
i, final_size);
2837 ok(
buf[0] == 0x11,
"%d: buf[0] was modified\n",
i);
2841 final_size = 0xdeadbeef;
2844 test_lznt[
i].compressed_size, 0, &final_size, workspace);
2852 ok(final_size == test_lznt[
i].uncompressed_size,
2853 "%d: got wrong final_size %lu\n",
i, final_size);
2855 "%d: got wrong decoded data\n",
i);
2856 ok(
buf[test_lznt[
i].uncompressed_size] == 0x11,
2857 "%d: buf[%lu] was modified\n",
i, test_lznt[
i].uncompressed_size);
2861 final_size = 0xdeadbeef;
2864 test_lznt[
i].compressed_size, 1, &final_size, workspace);
2872 if (test_lznt[
i].uncompressed_size == 0)
2875 ok(final_size == 4095,
"%d: got wrong final_size %lu\n",
i, final_size);
2877 ok(
buf[4095] == 0x11,
"%d: buf[4095] was modified\n",
i);
2881 ok(final_size == test_lznt[
i].uncompressed_size - 1,
2882 "%d: got wrong final_size %lu\n",
i, final_size);
2884 "%d: got wrong decoded data\n",
i);
2885 ok(
buf[test_lznt[
i].uncompressed_size - 1] == 0x11,
2886 "%d: buf[%lu] was modified\n",
i, test_lznt[
i].uncompressed_size - 1);
2891 final_size = 0xdeadbeef;
2894 test_lznt[
i].compressed_size, 4095, &final_size, workspace);
2903 ok(final_size == 1,
"%d: got wrong final_size %lu\n",
i, final_size);
2905 ok(
buf[0] == 0,
"%d: padding is not zero\n",
i);
2906 ok(
buf[1] == 0x11,
"%d: buf[1] was modified\n",
i);
2910 final_size = 0xdeadbeef;
2913 test_lznt[
i].compressed_size, 4096, &final_size, workspace);
2916 ok(
status == expected_status,
"%d: got wrong status 0x%08lx, expected 0x%08lx\n",
i,
status, expected_status);
2919 ok(final_size == 0,
"%d: got wrong final_size %lu\n",
i, final_size);
2920 ok(
buf[0] == 0x11,
"%d: buf[4096] was modified\n",
i);
2925#undef DECOMPRESS_BROKEN_FRAGMENT
2926#undef DECOMPRESS_BROKEN_TRUNCATED
2939 ret = pRtlIsCriticalSectionLocked(&
info->crit);
2941 ret = pRtlIsCriticalSectionLockedByThread(&
info->crit);
2948 ret = pRtlIsCriticalSectionLocked(&
info->crit);
2950 ret = pRtlIsCriticalSectionLockedByThread(&
info->crit);
2955 ret = pRtlIsCriticalSectionLocked(&
info->crit);
2957 ret = pRtlIsCriticalSectionLockedByThread(&
info->crit);
2974 if (!pRtlIsCriticalSectionLocked || !pRtlIsCriticalSectionLockedByThread)
2976 win_skip(
"skipping RtlIsCriticalSectionLocked tests, required functions not available\n");
2986 ret = pRtlIsCriticalSectionLocked(&
info.crit);
2988 ret = pRtlIsCriticalSectionLockedByThread(&
info.crit);
2993 ret = pRtlIsCriticalSectionLocked(&
info.crit);
2995 ret = pRtlIsCriticalSectionLockedByThread(&
info.crit);
3009 ret = pRtlIsCriticalSectionLocked(&
info.crit);
3011 ret = pRtlIsCriticalSectionLockedByThread(&
info.crit);
3029 if (!pRtlInitializeCriticalSectionEx)
3031 win_skip(
"RtlInitializeCriticalSectionEx is not available\n");
3036 pRtlInitializeCriticalSectionEx(&
cs, 0, 0);
3037 ok(
cs.DebugInfo == no_debug ||
broken(
cs.DebugInfo !=
NULL &&
cs.DebugInfo != no_debug) ,
3038 "expected DebugInfo != NULL and DebugInfo != ~0, got %p\n",
cs.DebugInfo);
3039 ok(
cs.LockCount == -1,
"expected LockCount == -1, got %ld\n",
cs.LockCount);
3040 ok(
cs.RecursionCount == 0,
"expected RecursionCount == 0, got %ld\n",
cs.RecursionCount);
3041 ok(
cs.LockSemaphore ==
NULL,
"expected LockSemaphore == NULL, got %p\n",
cs.LockSemaphore);
3043 "expected SpinCount == 0, got %Id\n",
cs.SpinCount);
3048 ok(
cs.DebugInfo == no_debug,
"expected DebugInfo == ~0, got %p\n",
cs.DebugInfo);
3049 ok(
cs.LockCount == -1,
"expected LockCount == -1, got %ld\n",
cs.LockCount);
3050 ok(
cs.RecursionCount == 0,
"expected RecursionCount == 0, got %ld\n",
cs.RecursionCount);
3051 ok(
cs.LockSemaphore ==
NULL,
"expected LockSemaphore == NULL, got %p\n",
cs.LockSemaphore);
3053 "expected SpinCount == 0, got %Id\n",
cs.SpinCount);
3062 if (!pRtlInitializeCriticalSectionEx)
3066 ok(!
status,
"RtlInitializeCriticalSection failed: %lx\n",
status);
3071 ok(
cs.LockCount == -2,
"expected LockCount == -2, got %ld\n",
cs.LockCount);
3072 ok(
cs.RecursionCount == 1,
"expected RecursionCount == 1, got %ld\n",
cs.RecursionCount);
3077 ok(
cs.LockCount == -1,
"expected LockCount == -1, got %ld\n",
cs.LockCount);
3078 ok(
cs.RecursionCount == 0,
"expected RecursionCount == 0, got %ld\n",
cs.RecursionCount);
3079 ok(!
cs.OwningThread,
"unexpected OwningThread %p\n",
cs.OwningThread);
3087 ok(
cs.LockCount == -1,
"expected LockCount == -1, got %ld\n",
cs.LockCount);
3088 ok(
cs.RecursionCount == -1,
"expected RecursionCount == -1, got %ld\n",
cs.RecursionCount);
3089 ok(!
cs.OwningThread,
"unexpected OwningThread %p\n",
cs.OwningThread);
3094 ok(
cs.LockCount == -1,
"expected LockCount == -1, got %ld\n",
cs.LockCount);
3095 ok(
cs.RecursionCount == -2,
"expected RecursionCount == -2, got %ld\n",
cs.RecursionCount);
3096 ok(!
cs.OwningThread,
"unexpected OwningThread %p\n",
cs.OwningThread);
3102 ok(
cs.LockCount == -2,
"expected LockCount == -2, got %ld\n",
cs.LockCount);
3103 ok(
cs.RecursionCount == 1,
"expected RecursionCount == 1, got %ld\n",
cs.RecursionCount);
3108 ok(
cs.LockCount == -1,
"expected LockCount == -1, got %ld\n",
cs.LockCount);
3109 ok(
cs.RecursionCount == 0,
"expected RecursionCount == 0, got %ld\n",
cs.RecursionCount);
3110 ok(!
cs.OwningThread,
"unexpected OwningThread %p\n",
cs.OwningThread);
3125 static const WCHAR ntdllW[] = {
'n',
't',
'd',
'l',
'l',
'.',
'd',
'l',
'l',0};
3140 if (!pLdrEnumerateLoadedModules)
3142 win_skip(
"LdrEnumerateLoadedModules not available\n");
3151 ok(
ctx.count > 1,
"Expected more than one module, got %d\n",
ctx.count);
3152 ok(
ctx.found,
"Could not find ntdll in list of modules\n");
3158 ok(
ctx.count == 1,
"Expected exactly one module, got %d\n",
ctx.count);
3166 status = pLdrEnumerateLoadedModules(
NULL,
NULL, (
void *)0xdeadbeef);
3184 ok(
len ==
sizeof(*sd_rel),
"got %lu\n",
len );
3189 ok(
len ==
sizeof(*sd_rel) + 4,
"got %lu\n",
len );
3194 ok(
len ==
sizeof(*sd_rel),
"got %lu\n",
len );
3199 ok(
len ==
sizeof(*sd_rel) + 4,
"got %lu\n",
len );
3204 ok(
len ==
sizeof(*sd_rel) + 4,
"got %lu\n",
len );
3215 return (
void *)((
char *)
module + va);
3235 ok(
data->Loaded.Flags == 0,
"Expected flags 0, got %lx\n",
data->Loaded.Flags);
3238 ok(!!
data->Loaded.DllBase,
"Expected non zero base address\n");
3239 ok(
data->Loaded.SizeOfImage,
"Expected non zero image size\n");
3242 mark = &
NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
3244 ok(
mod->DllBase ==
data->Loaded.DllBase,
"Expected base address %p, got %p\n",
3245 data->Loaded.DllBase,
mod->DllBase);
3251 ok(!!imports,
"Expected dll to have imports\n");
3253 for (
i = 0; imports[
i].
Name;
i++)
3256 if (imports[
i].OriginalFirstThunk)
3259 import_list = thunk_list;
3264 "Import has not been resolved: %p\n", (
void*)thunk_list[
j].
u1.
Function);
3303 mark = &
NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
3305 ok(
mod->DllBase ==
data->Loaded.DllBase,
"Expected base address %p, got %p\n",
3306 data->Loaded.DllBase,
mod->DllBase);
3307 if (
mod->DllBase !=
data->Loaded.DllBase)
3310 orig_entry =
mod->EntryPoint;
3342 mark = &
NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
3344 ok(
mod->DllBase ==
data->Loaded.DllBase,
"Expected base address %p, got %p\n",
3345 data->Loaded.DllBase,
mod->DllBase);
3346 if (
mod->DllBase !=
data->Loaded.DllBase)
3349 orig_entry =
mod->EntryPoint;
3381 if (!pLdrRegisterDllNotification || !pLdrUnregisterDllNotification)
3383 win_skip(
"Ldr(Un)RegisterDllNotification not available\n");
3413 ok(calls == 0x13,
"Expected order 0x13, got %lx\n", calls);
3417 ok(calls == 0x24,
"Expected order 0x24, got %lx\n", calls);
3419 pLdrUnregisterDllNotification(cookie2);
3420 pLdrUnregisterDllNotification(
cookie);
3429 ok(calls == 0x13,
"Expected order 0x13, got %lx\n", calls);
3433 ok(calls == 0x42,
"Expected order 0x42, got %lx\n", calls);
3435 pLdrUnregisterDllNotification(
cookie);
3443 ok(!
mod,
"Expected library to fail loading\n");
3444 ok(calls == 0x1342,
"Expected order 0x1342, got %lx\n", calls);
3446 pLdrUnregisterDllNotification(
cookie);
3455 ok(calls == 0x12 || calls == 0x21,
"got %lx\n", calls);
3458 pLdrUnregisterDllNotification(
cookie);
3521 skip(
"DbgPrint with a debugger attached is broken on ReactOS\n");
3596#if defined( __i386__ )
3600#elif defined( __x86_64__ )
3604#elif defined( __aarch64__ )
3621#define HEAP_VALIDATE_PARAMS 0x40000000
3639 const struct heap invalid = {{0, 0}, {0,
HEAP_VALIDATE_PARAMS}, {0, 0, 0, 0}, 0, {0, 0}, {0, 0, 0}, {0, 0},
HEAP_VALIDATE_PARAMS, 0, {0}};
3682 ok(!!
heap,
"Failed to create a heap.\n");
3687 ok(!!
heap,
"Failed to create a heap.\n");
3692 ok(!!
heap,
"Failed to create a heap.\n");
3697 params.InitialCommit = 0x1000;
3698 params.InitialReserve = 0x10000;
3702 ok(!
heap,
"Unexpected heap.\n");
3708 ok(!!
base,
"Unexpected pointer.\n");
3711 ok(!!
heap,
"Unexpected heap.\n");
3716 ok(!!
ptr,
"Failed to allocate a block.\n");
3726 ok(
ret,
"Unexpected return value.\n");
3745 ok(found,
"RtlFirstFreeAce failed\n");
3751 ok(found,
"RtlFirstFreeAce failed\n");
3759 ok(found,
"RtlFirstFreeAce failed\n");
3765 ok(!found,
"RtlFirstFreeAce failed\n");
3771 ok(!found,
"RtlFirstFreeAce failed\n");
3801 ok(!
ret,
"Unexpected return value %d.\n",
ret);
3806 ok(!
ret,
"Unexpected return value %d.\n",
ret);
3812 ok(
ret,
"Unexpected return value %d.\n",
ret);
3823 win_skip(
"RtlFindExportedRoutineByName is not present\n" );
3827 ok(
proc !=
NULL,
"Expected non NULL address\n" );
3829 ok(
proc ==
NULL,
"Shouldn't find forwarded function\n" );
3834#if !defined(__REACTOS__) || _WIN32_WINNT >= _WIN32_WINNT_WIN10
3838 if (!pRtlGetDeviceFamilyInfoEnum)
3840 win_skip(
"RtlGetDeviceFamilyInfoEnum is not present\n" );
3847 pRtlGetDeviceFamilyInfoEnum(&
version, &family, &
form);
3848 ok(
version != 0x1234567,
"got unexpected unchanged value 0x1234567\n" );
3851 trace(
"UAP version is %#I64x, device family is %lu, form factor is %lu\n",
version, family,
form );
3867 return *
value -
t->value;
3875 return *
value -
t->value;
3887 if (!(
c = compare_func(
key,
parent )))
return -1;
3916 static int test_values[] = { 44, 51, 6, 66, 69, 20, 87, 80, 72, 86, 90, 16, 54, 61, 62, 14, 27, 39, 42, 41 };
3921 int ret, is_red, min_val;
3926 if (!pRtlRbInsertNodeEx)
3928 win_skip(
"RtlRbInsertNodeEx is not present.\n" );
3932 memset( &rtl_tree, 0,
sizeof(rtl_tree) );
3936 min_val = test_values[0];
3941 nodes[
i].
value = test_values[
i];
3956 if (nodes[
i].
value <= min_val)
3958 min_val = nodes[
i].
value;
3961 ok( rtl_tree.min == prev_min_entry,
"unexpected min tree entry.\n" );
3971 pRtlRbRemoveNode( &rtl_tree, &nodes[
i].
rtl_entry );
3991 ok( !rtl_tree.root,
"got %p.\n", rtl_tree.root );
3992 ok( !rtl_tree.min,
"got %p.\n", rtl_tree.min );
3998 DWORD device_family_size, device_form_size,
ret;
3999 WCHAR device_family[16], device_form[16];
4001 if (!pRtlConvertDeviceFamilyInfoToString)
4003 win_skip(
"RtlConvertDeviceFamilyInfoToString is unavailable.\n" );
4012 device_family_size = 0;
4013 ret = pRtlConvertDeviceFamilyInfoToString(&device_family_size,
NULL,
NULL,
NULL);
4015 ok(device_family_size == (
wcslen(
L"Windows.Desktop") + 1) *
sizeof(
WCHAR),
4016 "Got unexpected %#lx.\n", device_family_size);
4018 device_form_size = 0;
4019 ret = pRtlConvertDeviceFamilyInfoToString(
NULL, &device_form_size,
NULL,
NULL);
4021 ok(device_form_size == (
wcslen(
L"Unknown") + 1) *
sizeof(
WCHAR),
"Got unexpected %#lx.\n",
4024 ret = pRtlConvertDeviceFamilyInfoToString(&device_family_size,
NULL, device_family,
NULL);
4026 ok(device_family_size == (
wcslen(
L"Windows.Desktop") + 1) *
sizeof(
WCHAR),
4027 "Got unexpected %#lx.\n", device_family_size);
4030 ret = pRtlConvertDeviceFamilyInfoToString(
NULL, &device_form_size,
NULL, device_form);
4032 ok(device_form_size == (
wcslen(
L"Unknown") + 1) *
sizeof(
WCHAR),
"Got unexpected %#lx.\n",
4036 ret = pRtlConvertDeviceFamilyInfoToString(&device_family_size, &device_form_size,
NULL,
NULL);
4040 device_family_size =
wcslen(
L"Windows.Desktop") *
sizeof(
WCHAR);
4042 ret = pRtlConvertDeviceFamilyInfoToString(&device_family_size, &device_form_size,
NULL,
NULL);
4044 ok(device_family_size == (
wcslen(
L"Windows.Desktop") + 1) *
sizeof(
WCHAR),
4045 "Got unexpected %#lx.\n", device_family_size);
4046 ok(device_form_size == (
wcslen(
L"Unknown") + 1) *
sizeof(
WCHAR),
"Got unexpected %#lx.\n",
4049 ret = pRtlConvertDeviceFamilyInfoToString(&device_family_size, &device_form_size, device_family, device_form);
4059 const UINT64 *ptr_A, *ptr_W, *ptr_workers;
4060 ULONG size_A, size_W, size_workers;
4062 if (!pRtlRetrieveNtUserPfn || !pRtlInitializeNtUserPfn)
4064 win_skip(
"user procs not supported\n" );
4068 status = pRtlRetrieveNtUserPfn( &ptr_A, &ptr_W, &ptr_workers );
4070 "RtlRetrieveNtUserPfn failed %lx\n",
status );
4074 size_A = (ptr_W - ptr_A) *
sizeof(
UINT64);
4075 size_W = (ptr_workers - ptr_W) *
sizeof(
UINT64);
4076 ok( size_A > 0x80 && size_A < 0x100,
"unexpected size for %p %p %p\n", ptr_A, ptr_W, ptr_workers );
4077 ok( size_W == size_A,
"unexpected size for %p %p %p\n", ptr_A, ptr_W, ptr_workers );
4078 memcpy( ptrs, ptr_A, size_A );
4083 if (!pRtlResetNtUserPfn)
4085 win_skip(
"RtlResetNtUserPfn not supported\n" );
4089 status = pRtlResetNtUserPfn();
4091 ok( !
memcmp( ptrs, ptr_A, size_A ),
"pointers changed by reset\n" );
4094 status = pRtlResetNtUserPfn();
4096 status = pRtlRetrieveNtUserPfn( &ptr_A, &ptr_W, &ptr_workers );
4099 for (size_workers = 0x100; size_workers > 0; size_workers--)
4105 trace(
"got sizes %lx %lx %lx\n", size_A, size_W, size_workers );
4106 if (!size_workers)
return;
4107 ok( !
memcmp( ptrs, ptr_A, size_A ),
"pointers changed by init\n" );
4112 status = pRtlResetNtUserPfn();
4116 ok( !
memcmp( ptrs, ptr_A, size_A ),
"pointers changed by init\n" );
std::map< E_MODULE, HMODULE > mod
static TCHAR test_buffer[TEST_BUFFER_SIZE]
COMPILER_DEPENDENT_UINT64 UINT64
NTSYSAPI ULONG NTAPI vDbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ PCCH Format, _In_ va_list ap)
#define DPFLTR_ERROR_LEVEL
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
static HINSTANCE instance
static BOOL reserve(struct dynamic_array *array, int count, int itemsize)
NTSTATUS NTAPI RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation)
BOOL WINAPI InitializeAcl(PACL pAcl, DWORD nAclLength, DWORD dwAclRevision)
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
#define RtlUlongByteSwap(_x)
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
#define GetProcAddress(x, y)
#define GetCurrentProcess()
#define RtlImageDirectoryEntryToData
#define HeapFree(x, y, z)
static const WCHAR version[]
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
UINT(* handler)(MSIPACKAGE *)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum const GLvoid * addr
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static XMS_HANDLE HandleTable[XMS_MAX_HANDLES]
#define EXCEPTION_EXECUTE_HANDLER
#define EXCEPTION_CONTINUE_SEARCH
#define EXCEPTION_CONTINUE_EXECUTION
#define DbgPrintEx(cmpid, lvl, fmt,...)
NTSTATUS NTAPI LdrUnlockLoaderLock(_In_ ULONG Flags, _In_opt_ ULONG_PTR Cookie)
PIMAGE_BASE_RELOCATION NTAPI LdrProcessRelocationBlock(_In_ ULONG_PTR Address, _In_ ULONG Count, _In_ PUSHORT TypeOffset, _In_ LONG_PTR Delta)
NTSTATUS NTAPI LdrLockLoaderLock(_In_ ULONG Flags, _Out_opt_ PULONG Disposition, _Out_opt_ PULONG_PTR Cookie)
NTSTATUS NTAPI LdrAddRefDll(_In_ ULONG Flags, _In_ PVOID BaseAddress)
#define LDR_DLL_NOTIFICATION_REASON_UNLOADED
#define LDR_ADDREF_DLL_PIN
#define LDR_DLL_NOTIFICATION_REASON_LOADED
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
#define memcpy(s1, s2, n)
static struct test_info tests[]
static void test_RtlFillMemoryUlong(void)
static void *WINAPI * pRtlFindExportedRoutineByName(HMODULE, const char *)
#define DECOMPRESS_BROKEN_TRUNCATED
static LONG CALLBACK test_heap_destroy_except_handler(EXCEPTION_POINTERS *eptrs)
static DWORD DWORD *static RTL_BALANCED_NODE RTL_BALANCED_NODE *static RTL_BALANCED_NODE *static DWORD WCHAR WCHAR *static ULONG const UINT64 ULONG const void ULONG workers_size
static void test_RtlIpv4StringToAddress(void)
static BOOL WINAPI fake_dll_main_fail(HINSTANCE instance, DWORD reason, void *reserved)
static void CALLBACK ldr_notify_callback_imports(ULONG reason, LDR_DLL_NOTIFICATION_DATA *data, void *context)
static void test_RtlDeleteTimer(void)
static NTSTATUS WINAPIV test_vDbgPrintEx(ULONG id, ULONG level, const char *fmt,...)
#define DECOMPRESS_BROKEN_FRAGMENT
static LONG CALLBACK test_dbg_print_except_handler(EXCEPTION_POINTERS *eptrs)
static void test_RtlIsCriticalSectionLocked(void)
static NTSTATUS WINAPIV test_vDbgPrintExWithPrefix(const char *prefix, ULONG id, ULONG level, const char *fmt,...)
static WCHAR wintrustdllW[]
static DWORD WINAPI critsect_locked_thread(void *param)
static void test_RtlComputeCrc32(void)
static void init_ip4(IN_ADDR *addr, const int src[4])
static void test_RtlQueryProcessDebugInformation(void)
static BOOL test_dbg_print_except
static void compare_RtlIpv6StringToAddressW(PCSTR name_a, int terminator_offset_a, const struct in6_addr *addr_a, NTSTATUS res_a)
static void CALLBACK ldr_notify_callback_dll_main(ULONG reason, LDR_DLL_NOTIFICATION_DATA *data, void *context)
static void * get_rva(HMODULE module, DWORD va)
static void test_RtlByteSwap(void)
static const all_accesses_t all_accesses[]
static WCHAR crypt32dllW[]
static DWORD DWORD *static RTL_BALANCED_NODE RTL_BALANCED_NODE *static RTL_BALANCED_NODE *static DWORD WCHAR WCHAR *static ULONG const UINT64 * client_procsW
static void test_RtlUniform(void)
struct _RTL_HANDLE_TABLE RTL_HANDLE_TABLE
static void test_RtlIpv6AddressToString(void)
static void test_RtlMakeSelfRelativeSD(void)
static void test_RtlFindExportedRoutineByName(void)
static void test_RtlInitializeCriticalSectionEx(void)
static void RtlpMakeHandleAllocated(RTL_HANDLE *Handle)
static void test_RtlAreAnyAccessesGranted(void)
static void test_RtlThreadErrorMode(void)
static void test_RtlRandom(void)
static ULONG dest_aligned_block[32]
static const char * src_src
static DWORD DWORD *static RTL_BALANCED_NODE RTL_BALANCED_NODE *static RTL_BALANCED_NODE *static DWORD WCHAR WCHAR *static ULONG const UINT64 ULONG procsW_size
static WCHAR ws2_32dllW[]
static void test_RtlIpv4AddressToStringEx(void)
static void test_DbgPrint(void)
struct _RTL_HANDLE RTL_HANDLE
static void test_RtlCreateHeap(void)
static void CALLBACK ldr_notify_callback2(ULONG reason, LDR_DLL_NOTIFICATION_DATA *data, void *context)
static const any_accesses_t any_accesses[]
static void test_RtlZeroMemory(void)
static void test_RtlIpv4StringToAddressEx(void)
static void test_LdrAddRefDll(void)
static void test_RtlIpv6StringToAddressEx(void)
static void test_RtlLeaveCriticalSection(void)
static void compare_RtlIpv6StringToAddressExW(PCSTR name_a, const struct in6_addr *addr_a, HRESULT res_a, ULONG scope_a, USHORT port_a)
static LONG test_dbg_print_except_ret
#define COMP(str1, str2, cmplen, len)
static struct test_rb_tree_entry * test_rb_tree_entry_from_wine_rb(struct rb_entry *entry)
static void test_RtlValidSecurityDescriptor(void)
int terminator_offset_strict
#define HEAP_VALIDATE_PARAMS
#define call_fastcall_func1(func, a)
static void test_RtlMoveMemory(void)
static void InitFunctionPtrs(void)
static void test_RtlCompareMemory(void)
static void WINAPI ldr_enum_callback(LDR_DATA_TABLE_ENTRY *module, void *context, BOOLEAN *stop)
static ULONG src_aligned_block[4]
static BOOL test_heap_destroy_dbgstr
static NTSTATUS NTAPI test_commit_routine(void *base, void **address, SIZE_T *size)
static const struct @1831 ipv6_tests[]
static DWORD DWORD *static RTL_BALANCED_NODE RTL_BALANCED_NODE *static RTL_BALANCED_NODE *static DWORD WCHAR WCHAR *static ULONG const UINT64 ULONG const void * client_workers
static struct test_rb_tree_entry * test_rb_tree_entry_from_rtl_rb(RTL_BALANCED_NODE *entry)
static void test_RtlDecompressBuffer(void)
static void test_HandleTables(void)
static struct test_rb_tree_entry * test_rb_tree_entry_rtl_parent(struct test_rb_tree_entry *node)
static void test_LdrRegisterDllNotification(void)
static BOOL test_heap_destroy_break
static int test_rtl_rb_tree_entry_compare(const void *key, const RTL_BALANCED_NODE *entry)
static void test_RtlCompressBuffer(void)
static BOOL is_incomplete_chunk(const UCHAR *compressed, ULONG compressed_size, BOOL check_all)
static void init_ip6(IN6_ADDR *addr, const int src[8])
static void test_RtlFillMemory(void)
static void test_LdrEnumerateLoadedModules(void)
static void test_RtlConvertDeviceFamilyInfoToString(void)
static void test_RtlGetCompressionWorkSpaceSize(void)
static void CALLBACK ldr_notify_callback1(ULONG reason, LDR_DLL_NOTIFICATION_DATA *data, void *context)
static DWORD * dll_main_data
static void test_RtlIpv6StringToAddress(void)
static void test_RtlDestroyHeap(void)
static void test_RtlAllocateAndInitializeSid(void)
static void test_RtlAreAllAccessesGranted(void)
static BOOL WINAPI fake_dll_main(HINSTANCE instance, DWORD reason, void *reserved)
static void test_user_procs(void)
static void test_RtlGetDeviceFamilyInfoEnum(void)
static void test_RtlInitializeSid(void)
static DWORD DWORD *static RTL_BALANCED_NODE RTL_BALANCED_NODE *static RTL_BALANCED_NODE *static DWORD WCHAR WCHAR *static ULONG procsA_size
static struct @1830 ipv4_tests[]
static void test_LdrLockLoaderLock(void)
const WCHAR * expected_dll
static void test_RtlCompareMemoryUlong(void)
static int test_rb_tree_entry_compare(const void *key, const struct wine_rb_entry *entry)
static void test_RtlFirstFreeAce(void)
static void test_RtlIpv6AddressToStringEx(void)
static void test_rb_tree(void)
static struct commit_routine_context commit_context
static int rtl_rb_tree_put(RTL_RB_TREE *tree, const void *key, RTL_BALANCED_NODE *entry, int(*compare_func)(const void *key, const RTL_BALANCED_NODE *entry))
static void void *static PLDR_DLL_NOTIFICATION_FUNCTION
static void test_LdrProcessRelocationBlock(void)
static void CALLBACK ldr_notify_callback_fail(ULONG reason, LDR_DLL_NOTIFICATION_DATA *data, void *context)
static USHORT __my_ushort_swap(USHORT s)
static void test_RtlIpv4AddressToString(void)
static const BYTE uncompressed[]
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
#define DPFLTR_WARNING_LEVEL
NTSYSAPI ULONG NTAPI RtlUniform(_In_ PULONG Seed)
NTSYSAPI NTSTATUS NTAPI RtlIpv6StringToAddressW(_In_ PCWSTR String, _Out_ PCWSTR *Terminator, _Out_ struct in6_addr *Addr)
NTSYSAPI NTSTATUS NTAPI RtlDeleteCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlDestroyQueryDebugBuffer(IN PRTL_DEBUG_INFORMATION DebugBuffer)
NTSYSAPI VOID NTAPI RtlInitializeHandleTable(_In_ ULONG TableSize, _In_ ULONG HandleSize, _In_ PRTL_HANDLE_TABLE HandleTable)
NTSYSAPI NTSTATUS NTAPI RtlCompressBuffer(_In_ USHORT CompressionFormatAndEngine, _In_reads_bytes_(UncompressedBufferSize) PUCHAR UncompressedBuffer, _In_ ULONG UncompressedBufferSize, _Out_writes_bytes_to_(CompressedBufferSize, *FinalCompressedSize) PUCHAR CompressedBuffer, _In_ ULONG CompressedBufferSize, _In_ ULONG UncompressedChunkSize, _Out_ PULONG FinalCompressedSize, _In_ PVOID WorkSpace)
NTSYSAPI BOOLEAN NTAPI RtlFreeHandle(_In_ PRTL_HANDLE_TABLE HandleTable, _In_ PRTL_HANDLE_TABLE_ENTRY Handle)
NTSYSAPI VOID NTAPI RtlDestroyHandleTable(_Inout_ PRTL_HANDLE_TABLE HandleTable)
NTSYSAPI NTSTATUS NTAPI RtlGetCompressionWorkSpaceSize(_In_ USHORT CompressionFormatAndEngine, _Out_ PULONG CompressBufferWorkSpaceSize, _Out_ PULONG CompressFragmentWorkSpaceSize)
NTSYSAPI NTSTATUS NTAPI RtlQueryProcessDebugInformation(_In_ ULONG ProcessId, _In_ ULONG DebugInfoClassMask, _Inout_ PRTL_DEBUG_INFORMATION DebugBuffer)
NTSYSAPI PRTL_HANDLE_TABLE_ENTRY NTAPI RtlAllocateHandle(_In_ PRTL_HANDLE_TABLE HandleTable, _Inout_ PULONG Index)
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
NTSYSAPI ULONG NTAPI RtlRandom(_Inout_ PULONG Seed)
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI PSTR NTAPI RtlIpv6AddressToStringA(_In_ const struct in6_addr *Addr, _Out_writes_(46) PSTR S)
NTSYSAPI PRTL_DEBUG_INFORMATION NTAPI RtlCreateQueryDebugBuffer(_In_ ULONG Size, _In_ BOOLEAN EventPair)
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI PVOID NTAPI RtlFreeSid(_In_ _Post_invalid_ PSID Sid)
NTSYSAPI NTSTATUS NTAPI RtlIpv4StringToAddressA(_In_ PCSTR String, _In_ BOOLEAN Strict, _Out_ PCSTR *Terminator, _Out_ struct in_addr *Addr)
NTSYSAPI NTSTATUS NTAPI RtlDeleteTimer(_In_ HANDLE TimerQueue, _In_ HANDLE Timer, _In_ HANDLE CompletionEvent)
NTSYSAPI NTSTATUS NTAPI RtlMakeSelfRelativeSD(_In_ PSECURITY_DESCRIPTOR AbsoluteSD, _Out_ PSECURITY_DESCRIPTOR SelfRelativeSD, _Inout_ PULONG BufferLength)
NTSYSAPI BOOLEAN NTAPI RtlValidSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
NTSYSAPI NTSTATUS NTAPI RtlIpv6StringToAddressA(_In_ PCSTR String, _Out_ PCSTR *Terminator, _Out_ struct in6_addr *Addr)
NTSYSAPI BOOLEAN NTAPI RtlFirstFreeAce(PACL Acl, PACE *Ace)
NTSYSAPI BOOLEAN NTAPI RtlAreAllAccessesGranted(ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess)
NTSYSAPI BOOLEAN NTAPI RtlAreAnyAccessesGranted(ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess)
_Use_decl_annotations_ NTSTATUS NTAPI RtlMultiByteToUnicodeN(_Out_ PWCH UnicodeString, _In_ ULONG UnicodeSize, _Out_opt_ PULONG ResultSize, _In_ PCCH MbString, _In_ ULONG MbSize)
NTSYSAPI PVOID NTAPI RtlDestroyHeap(IN PVOID HeapHandle)
NTSYSAPI PVOID NTAPI RtlCreateHeap(IN ULONG Flags, IN PVOID HeapBase OPTIONAL, IN ULONG ReserveSize OPTIONAL, IN ULONG CommitSize OPTIONAL, IN PVOID Lock OPTIONAL, IN PRTL_HEAP_PARAMETERS Parameters OPTIONAL)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define RTL_BALANCED_NODE_RESERVED_PARENT_MASK
#define COMPRESSION_FORMAT_DEFAULT
#define COMPRESSION_FORMAT_NONE
#define COMPRESSION_ENGINE_MAXIMUM
#define COMPRESSION_FORMAT_LZNT1
NTSYSAPI NTSTATUS NTAPI RtlAllocateAndInitializeSid(IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, IN UCHAR SubAuthorityCount, IN ULONG SubAuthority0, IN ULONG SubAuthority1, IN ULONG SubAuthority2, IN ULONG SubAuthority3, IN ULONG SubAuthority4, IN ULONG SubAuthority5, IN ULONG SubAuthority6, IN ULONG SubAuthority7, OUT PSID *Sid)
NTSYSAPI NTSTATUS NTAPI RtlAbsoluteToSelfRelativeSD(IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor, IN OUT PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor, IN PULONG BufferLength)
NTSYSAPI NTSTATUS NTAPI RtlInitializeSid(IN OUT PSID Sid, IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, IN UCHAR SubAuthorityCount)
#define STATUS_UNSUPPORTED_COMPRESSION
#define STATUS_BAD_DESCRIPTOR_FORMAT
#define STATUS_BAD_COMPRESSION_BUFFER
#define STATUS_INVALID_CID
#define STATUS_ASSERTION_FAILURE
#define STATUS_INVALID_SID
#define STATUS_INVALID_PARAMETER_2
#define STATUS_BREAKPOINT
#define DBG_PRINTEXCEPTION_C
#define STATUS_INVALID_PARAMETER_1
#define STATUS_INVALID_PARAMETER_3
#define IMAGE_DIRECTORY_ENTRY_IMPORT
const char int int int static __inline const char * wine_dbgstr_a(const char *s)
#define WINE_RB_ENTRY_VALUE
static struct rb_entry * rb_head(struct rb_entry *iter)
static int rb_put(struct rb_tree *tree, const void *key, struct rb_entry *entry)
#define RB_FOR_EACH_ENTRY(elem, tree, type, field)
static void rb_remove(struct rb_tree *tree, struct rb_entry *entry)
static void rb_init(struct rb_tree *tree, rb_compare_func_t compare)
ULONG NTAPI vDbgPrintExWithPrefix(IN PCCH Prefix, IN ULONG ComponentId, IN ULONG Level, IN PCCH Format, IN va_list ap)
#define _WIN32_WINNT_VISTA
#define STATUS_BUFFER_TOO_SMALL
PEXCEPTION_RECORD ExceptionRecord
ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]
union _IMAGE_THUNK_DATA32::@2335 u1
struct _LIST_ENTRY * Blink
struct _RTL_HANDLE * Next
FIXME: should move to rtltypes.h, but we can't include it here.
ACCESS_MASK GrantedAccess
ACCESS_MASK DesiredAccess
ACCESS_MASK GrantedAccess
ACCESS_MASK DesiredAccess
union in_addr::@1116 S_un
RTL_BALANCED_NODE rtl_entry
struct rb_entry wine_rb_entry
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreW(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseSemaphore(IN HANDLE hSemaphore, IN LONG lReleaseCount, IN LPLONG lpPreviousCount)
NTSYSAPI PSTR NTAPI RtlIpv4AddressToStringA(_In_ const struct in_addr *Addr, _Out_writes_(16) PSTR S)
Character const *const prefix
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
BOOL NTAPI VirtualFree(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
DWORD WINAPI GetCurrentProcessId(void)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define __ASM_STDCALL_FUNC(name, args, code)
NTSYSAPI BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **)
NTSYSAPI ULONG WINAPI RtlRemoveVectoredExceptionHandler(PVOID)
NTSYSAPI NTSTATUS WINAPI RtlDecompressFragment(USHORT, PUCHAR, ULONG, PUCHAR, ULONG, ULONG, PULONG, PVOID)
NTSYSAPI PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG, PVECTORED_EXCEPTION_HANDLER)
NTSYSAPI NTSTATUS WINAPI RtlDecompressBuffer(USHORT, PUCHAR, ULONG, PUCHAR, ULONG, PULONG)
#define IMAGE_REL_BASED_HIGHLOW
#define DEVICEFAMILYDEVICEFORM_MAX
#define IMAGE_REL_BASED_HIGH
#define RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO
#define IMAGE_REL_BASED_LOW
#define DEVICEFAMILYINFOENUM_MAX
#define RtlUlonglongByteSwap(_x)
#define RtlUshortByteSwap(_x)
_Must_inspect_result_ NTSYSAPI SIZE_T NTAPI RtlCompareMemoryUlong(_In_reads_bytes_(Length) PVOID Source, _In_ SIZE_T Length, _In_ ULONG Pattern)
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET _In_ PGENERIC_MAPPING _In_ KPROCESSOR_MODE _Out_ PACCESS_MASK GrantedAccess
struct _SECURITY_DESCRIPTOR_RELATIVE SECURITY_DESCRIPTOR_RELATIVE
#define SECURITY_NT_AUTHORITY
#define SECURITY_DESCRIPTOR_REVISION
#define SECURITY_DESCRIPTOR_MIN_LENGTH
#define SID_MAX_SUB_AUTHORITIES
#define SECURITY_MAX_SID_SIZE