33static const WCHAR stringW[] = {
's',
't',
'r',
'i',
'n',
'g',
'W', 0};
35#define STR_TRUNC_SIZE (sizeof(stringW)-2*sizeof(*stringW))
37#ifndef __WINE_WINTERNL_H
40#define RTL_REGISTRY_ABSOLUTE 0
41#define RTL_REGISTRY_SERVICES 1
42#define RTL_REGISTRY_CONTROL 2
43#define RTL_REGISTRY_WINDOWS_NT 3
44#define RTL_REGISTRY_DEVICEMAP 4
45#define RTL_REGISTRY_USER 5
47#define RTL_REGISTRY_HANDLE 0x40000000
48#define RTL_REGISTRY_OPTIONAL 0x80000000
50#define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
51#define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
52#define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
53#define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
54#define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
55#define RTL_QUERY_REGISTRY_DIRECT 0x00000020
56#define RTL_QUERY_REGISTRY_DELETE 0x00000040
106#define InitializeObjectAttributes(p,n,a,r,s) \
108 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
109 (p)->RootDirectory = r; \
110 (p)->Attributes = a; \
111 (p)->ObjectName = n; \
112 (p)->SecurityDescriptor = s; \
113 (p)->SecurityQualityOfService = NULL; \
158#define NTDLL_GET_PROC(func) \
159 p ## func = (void*)GetProcAddress(hntdll, #func); \
161 trace("GetProcAddress(%s) failed\n", #func); \
162 FreeLibrary(hntdll); \
170 trace(
"Could not load ntdll.dll\n");
223 trace(
"ValueType: REG_NONE\n");
228 trace(
"ValueType: REG_BINARY\n");
233 trace(
"ValueType: REG_SZ\n");
238 trace(
"ValueType: REG_MULTI_SZ\n");
243 trace(
"ValueType: REG_EXPAND_SZ\n");
248 trace(
"ValueType: REG_DWORD\n");
257 ok(!1,
"Invalid Test Specified!\n");
352 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n",
status);
376 pRtlCreateUnicodeStringFromAsciiz( &
str,
"Machine" );
383 pRtlFreeUnicodeString( &
str );
386 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\Machine" );
394 pRtlFreeUnicodeString( &
str );
396 pRtlCreateUnicodeStringFromAsciiz( &
str,
"" );
400 pRtlFreeUnicodeString( &
str );
402 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\" );
406 pRtlFreeUnicodeString( &
str );
408 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry" );
413 pRtlFreeUnicodeString( &
str );
415 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\" );
419 pRtlFreeUnicodeString( &
str );
421 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Foobar" );
425 pRtlFreeUnicodeString( &
str );
427 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Foobar\\Machine" );
431 pRtlFreeUnicodeString( &
str );
433 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Machine\\Software\\Classes" );
437 pRtlFreeUnicodeString( &
str );
439 pRtlCreateUnicodeStringFromAsciiz( &
str,
"Machine\\Software\\Classes" );
443 pRtlFreeUnicodeString( &
str );
445 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Device\\Null" );
449 pRtlFreeUnicodeString( &
str );
453 win_skip(
"NtOpenKeyEx not available\n");
476 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got: 0x%08x\n",
status);
481 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n",
status);
486 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got: 0x%08x\n",
status);
491 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n",
status);
498 "Expected STATUS_ACCESS_VIOLATION or STATUS_ACCESS_DENIED, got: 0x%08x\n",
status);
512 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test\\sub\\key" );
513 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
515 pRtlFreeUnicodeString( &
str );
517 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test\\subkey" );
518 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
520 pRtlFreeUnicodeString( &
str );
522 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test\\subkey\\" );
523 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
525 pRtlFreeUnicodeString( &
str );
527 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test_subkey\\" );
528 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
530 "NtCreateKey failed: 0x%08x\n",
status );
533 pNtDeleteKey( subkey );
536 pRtlFreeUnicodeString( &
str );
538 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test_subkey" );
539 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
541 pRtlFreeUnicodeString( &
str );
542 pNtDeleteKey( subkey );
545 attr.RootDirectory = 0;
548 pRtlCreateUnicodeStringFromAsciiz( &
str,
"" );
549 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
552 pRtlFreeUnicodeString( &
str );
554 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\" );
555 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
558 pRtlFreeUnicodeString( &
str );
560 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry" );
561 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
564 "NtCreateKey failed: 0x%08x\n",
status );
565 if (!
status) pNtClose( subkey );
566 pRtlFreeUnicodeString( &
str );
568 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\" );
569 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
571 "NtCreateKey failed: 0x%08x\n",
status );
572 if (!
status) pNtClose( subkey );
573 pRtlFreeUnicodeString( &
str );
575 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Foobar" );
576 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
579 pRtlFreeUnicodeString( &
str );
581 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Foobar\\Machine" );
582 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
585 pRtlFreeUnicodeString( &
str );
587 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Machine\\Software\\Classes" );
588 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
591 pRtlFreeUnicodeString( &
str );
593 pRtlCreateUnicodeStringFromAsciiz( &
str,
"Machine\\Software\\Classes" );
594 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
597 pRtlFreeUnicodeString( &
str );
599 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Device\\Null" );
600 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
603 pRtlFreeUnicodeString( &
str );
605 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\Machine\\Software\\Classes" );
606 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
608 "NtCreateKey failed: 0x%08x\n",
status );
609 if (!
status) pNtClose( subkey );
610 pRtlFreeUnicodeString( &
str );
614 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\Machine\\Software\\Classes" );
615 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
618 pRtlFreeUnicodeString( &
str );
620 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\REGISTRY\\Machine\\Software\\Classes" );
621 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
623 "NtCreateKey failed: 0x%08x\n",
status );
624 if (!
status) pNtClose( subkey );
625 pRtlFreeUnicodeString( &
str );
627 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\REGISTRY\\MACHINE\\SOFTWARE\\CLASSES" );
628 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
630 "NtCreateKey failed: 0x%08x\n",
status );
631 if (!
status) pNtClose( subkey );
632 pRtlFreeUnicodeString( &
str );
650 pRtlCreateUnicodeStringFromAsciiz(&ValName,
"deletetest");
653 pRtlFreeUnicodeString(&ValName);
655 pRtlCreateUnicodeStringFromAsciiz(&ValName,
"stringtest");
658 pRtlFreeUnicodeString(&ValName);
694 pNtOpenKey(&hkey, am, &
attr);
696 status = pNtFlushKey(hkey);
713 pRtlCreateUnicodeStringFromAsciiz(&ValName,
"deletetest");
723 ok(basic_info->
TitleIndex == 0,
"NtQueryValueKey returned wrong TitleIndex %d\n", basic_info->
TitleIndex);
724 ok(basic_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %d\n", basic_info->
Type);
725 ok(basic_info->
NameLength == 20,
"NtQueryValueKey returned wrong NameLength %d\n", basic_info->
NameLength);
731 ok(basic_info->
TitleIndex == 0,
"NtQueryValueKey returned wrong TitleIndex %d\n", basic_info->
TitleIndex);
732 ok(basic_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %d\n", basic_info->
Type);
733 ok(basic_info->
NameLength == 20,
"NtQueryValueKey returned wrong NameLength %d\n", basic_info->
NameLength);
742 ok(partial_info->
TitleIndex == 0,
"NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->
TitleIndex);
743 ok(partial_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %d\n", partial_info->
Type);
744 ok(partial_info->
DataLength == 4,
"NtQueryValueKey returned wrong DataLength %d\n", partial_info->
DataLength);
750 ok(partial_info->
TitleIndex == 0,
"NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->
TitleIndex);
751 ok(partial_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %d\n", partial_info->
Type);
752 ok(partial_info->
DataLength == 4,
"NtQueryValueKey returned wrong DataLength %d\n", partial_info->
DataLength);
754 ok(*(
DWORD *)partial_info->
Data == 711,
"incorrect Data returned: 0x%x\n", *(
DWORD *)partial_info->
Data);
762 ok(full_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %d\n", full_info->
Type);
766 "NtQueryValueKey returned wrong len %d\n",
len);
773 ok(full_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %d\n", full_info->
Type);
777 ok(*(
DWORD *)((
char *)full_info + full_info->
DataOffset) == 711,
"incorrect Data returned: 0x%x\n",
781 pRtlFreeUnicodeString(&ValName);
782 pRtlCreateUnicodeStringFromAsciiz(&ValName,
"stringtest");
790 ok(partial_info->
TitleIndex == 0,
"NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->
TitleIndex);
791 ok(partial_info->
Type ==
REG_SZ,
"NtQueryValueKey returned wrong Type %d\n", partial_info->
Type);
811 pRtlFreeUnicodeString(&ValName);
813 pRtlCreateUnicodeStringFromAsciiz(&ValName,
"custtest");
814 status = pNtSetValueKey(
key, &ValName, 0, 0xff00ff00,
NULL, 0);
819 ok(
pi.Type == 0xff00ff00,
"Type=%x\n",
pi.Type);
820 ok(
pi.DataLength == 0,
"DataLength=%u\n",
pi.DataLength);
821 pRtlFreeUnicodeString(&ValName);
840 status = pNtDeleteKey(hkey);
846 static const WCHAR emptyW[] = {
'E',
'M',
'P',
'T',
'Y',0};
853 if (!pNtQueryLicenseValue)
855 win_skip(
"NtQueryLicenseValue not found, skipping tests\n");
864 ok(
type == 0xdead,
"expected unmodified value for type, got %u\n",
type);
865 ok(
len == 0xbeef,
"expected unmodified value for len, got %u\n",
len);
868 pRtlCreateUnicodeStringFromAsciiz(&
name,
"");
874 ok(
type == 0xdead,
"expected unmodified value for type, got %u\n",
type);
875 ok(
len == 0xbeef,
"expected unmodified value for len, got %u\n",
len);
880 ok(
type == 0xdead,
"expected unmodified value for type, got %u\n",
type);
885 ok(
len == 0xbeef,
"expected unmodified value for len, got %u\n",
len);
891 ok(
type == 0xdead,
"expected unmodified value for type, got %u\n",
type);
892 ok(
len == 0xbeef,
"expected unmodified value for len, got %u\n",
len);
894 pRtlFreeUnicodeString(&
name);
897 pRtlCreateUnicodeStringFromAsciiz(&
name,
"Nonexistent-License-Value");
903 ok(
type == 0xdead,
"expected unmodified value for type, got %u\n",
type);
904 ok(
len == 0xbeef,
"expected unmodified value for len, got %u\n",
len);
909 ok(
type == 0xdead,
"expected unmodified value for type, got %u\n",
type);
914 ok(
len == 0xbeef,
"expected unmodified value for len, got %u\n",
len);
920 ok(
type == 0xdead,
"expected unmodified value for type, got %u\n",
type);
921 ok(
len == 0xbeef,
"expected unmodified value for len, got %u\n",
len);
923 pRtlFreeUnicodeString(&
name);
926 pRtlCreateUnicodeStringFromAsciiz(&
name,
"Kernel-MUI-Language-Allowed");
932 ok(
type == 0xdead,
"expected unmodified value for type, got %u\n",
type);
933 ok(
len == 0xbeef,
"expected unmodified value for len, got %u\n",
len);
938 ok(
type == 0xdead,
"expected unmodified value for type, got %u\n",
type);
968 ok(
buffer[0] == 0x1111,
"expected buffer[0] = 0x1111, got %u\n",
buffer[0]);
970 pRtlFreeUnicodeString(&
name);
973 pRtlCreateUnicodeStringFromAsciiz(&
name,
"Kernel-MUI-Number-Allowed");
979 ok(
type == 0xdead,
"expected unmodified value for type, got %u\n",
type);
980 ok(
len == 0xbeef,
"expected unmodified value for len, got %u\n",
len);
985 ok(
type == 0xdead,
"expected unmodified value for type, got %u\n",
type);
1006 ok(
value != 0xdeadbeef,
"expected value != 0xdeadbeef\n");
1015 pRtlFreeUnicodeString(&
name);
1028 static const WCHAR linkW[] = {
'l',
'i',
'n',
'k',0};
1029 static const WCHAR valueW[] = {
'v',
'a',
'l',
'u',
'e',0};
1030 static const WCHAR symlinkW[] = {
'S',
'y',
'm',
'b',
'o',
'l',
'i',
'c',
'L',
'i',
'n',
'k',
'V',
'a',
'l',
'u',
'e',0};
1031 static const WCHAR targetW[] = {
'\\',
't',
'a',
'r',
'g',
'e',
't',0};
1042 pRtlInitUnicodeString( &link_str,
linkW );
1043 pRtlInitUnicodeString( &symlink_str, symlinkW );
1044 pRtlInitUnicodeString( &target_str, targetW + 1 );
1053 attr.RootDirectory = 0;
1054 attr.Attributes = 0;
1057 attr.SecurityQualityOfService =
NULL;
1063 attr.ObjectName = &link_str;
1078 attr.ObjectName = &link_str;
1084 attr.ObjectName = &target_str;
1093 attr.ObjectName = &link_str;
1112 "wrong len %u\n",
len );
1113 status = pNtDeleteValueKey(
key, &symlink_str );
1118 attr.Attributes = 0;
1135 attr.ObjectName = &link_str;
1143 "wrong len %u\n",
len );
1156 "wrong len %u\n",
len );
1166 "wrong len %u\n",
len );
1169 attr.Attributes = 0;
1186 "wrong len %u\n",
len );
1190 attr.ObjectName = &target_str;
1197 attr.ObjectName = &link_str;
1198 attr.Attributes = 0;
1207 attr.ObjectName = &target_str;
1214 attr.ObjectName = &target_str;
1225 attr.ObjectName = &null_str;
1232 "wrong len %u\n",
len );
1241 "wrong len %u\n",
len );
1248 attr.Attributes = 0;
1249 attr.ObjectName = &null_str;
1269 attr.Attributes = 0;
1270 attr.ObjectName = &link_str;
1277 attr.ObjectName = &link_str;
1280 "NtOpenKey wrong status 0x%08x\n",
status );
1291 attr.ObjectName = &target_str;
1304 target, target_len +
sizeof(targetW) -
sizeof(
WCHAR) );
1309 "NtOpenKey failed: 0x%08x\n",
status );
1346 attr.SecurityQualityOfService =
NULL;
1347 pRtlCreateUnicodeStringFromAsciiz( &
str,
name );
1362 pRtlFreeUnicodeString( &
str );
1371#define check_key_value(root,name,flags,expect) _check_key_value( __LINE__, root, name, flags, expect )
1375 static const WCHAR softwareW[] = {
'\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
1376 'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
1377 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',0};
1378 static const WCHAR wownodeW[] = {
'\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
1379 'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
1380 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
1381 'W',
'o',
'w',
'6',
'4',
'3',
'2',
'N',
'o',
'd',
'e',0};
1382 static const WCHAR wine64W[] = {
'\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
1383 'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
1384 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
1386 static const WCHAR wine32W[] = {
'\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
1387 'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
1388 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
1389 'W',
'o',
'w',
'6',
'4',
'3',
'2',
'N',
'o',
'd',
'e',
'\\',
1391 static const WCHAR key64W[] = {
'\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
1392 'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
1393 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
1394 'W',
'i',
'n',
'e',
'\\',
'W',
'i',
'n',
'e',
't',
'e',
's',
't',0};
1395 static const WCHAR key32W[] = {
'\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
1396 'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
1397 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
1398 'W',
'o',
'w',
'6',
'4',
'3',
'2',
'N',
'o',
'd',
'e',
'\\',
1399 'W',
'i',
'n',
'e',
'\\',
'W',
'i',
'n',
'e',
't',
'e',
's',
't',0};
1400 static const WCHAR classes64W[] = {
'\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
1401 'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
1402 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
1403 'C',
'l',
'a',
's',
's',
'e',
's',
'\\',
1405 static const WCHAR classes32W[] = {
'\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
1406 'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
1407 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
1408 'C',
'l',
'a',
's',
's',
'e',
's',
'\\',
1409 'W',
'o',
'w',
'6',
'4',
'3',
'2',
'N',
'o',
'd',
'e',
'\\',
1417 HANDLE key, root32, root64, key32, key64;
1427 trace(
"Not on Wow64, no redirection\n" );
1433 attr.RootDirectory = 0;
1437 attr.SecurityQualityOfService =
NULL;
1439 pRtlInitUnicodeString( &
str, wine64W );
1443 pRtlInitUnicodeString( &
str, wine32W );
1447 pRtlInitUnicodeString( &
str, key64W );
1451 pRtlInitUnicodeString( &
str, key32W );
1467 ok(
dw == 32,
"wrong value %u\n",
dw );
1473 ok(
dw == 64,
"wrong value %u\n",
dw );
1475 pRtlInitUnicodeString( &
str, softwareW );
1485 trace(
"using Vista-style Wow6432Node handling\n" );
1528 check_key_value( 0,
"\\Registry\\Machine\\Software\\Wow6432Node\\Wine\\Winetest", 0, 32 );
1545 pRtlInitUnicodeString( &
str, wownodeW );
1558 ok(
dw == (is_vista ? 64 : 32) ||
broken(
dw == 32) ,
"wrong value %u\n",
dw );
1571 pRtlInitUnicodeString( &
str, wine32W );
1584 ok(
dw == 32 || (is_vista &&
dw == 64),
"wrong value %u\n",
dw );
1597 pRtlInitUnicodeString( &
str, wine64W );
1624 status = pNtDeleteKey( key32 );
1628 status = pNtDeleteKey( key64 );
1632 pNtDeleteKey( root32 );
1634 pNtDeleteKey( root64 );
1639 pRtlInitUnicodeString( &
str, classes64W );
1643 skip(
"Not authorized to modify the Classes key\n");
1648 pRtlInitUnicodeString( &
str, classes32W );
1662 pRtlInitUnicodeString( &
str, classes64W );
1671 pRtlInitUnicodeString( &
str, classes32W );
1678 ok(
dw == 32,
"wrong value %u\n",
dw );
1680 pNtDeleteKey( key32 );
1682 pNtDeleteKey( key64 );
1705 status = pNtDeleteValueKey(
key, &ValName);
1709 "NtSetValueKey with long value name returned 0x%08x\n",
status);
1711 status = pNtDeleteValueKey(
key, &ValName);
1717 pRtlFreeUnicodeString(&ValName);
1738 win_skip(
"KeyNameInformation is not supported\n");
1758 str.Length =
info->NameLength;
1760 "got %s, expected %s\n",
1768 pRtlCreateUnicodeStringFromAsciiz(&
str,
"test_subkey");
1771 pRtlFreeUnicodeString(&
str);
1778 ok(
len ==
sizeof(cached_info),
"got unexpected length %d\n",
len);
1779 ok(cached_info.
SubKeys == 0,
"cached_info.SubKeys = %u\n", cached_info.
SubKeys);
1781 ok(cached_info.
Values == 0,
"cached_info.Values = %u\n", cached_info.
Values);
1787 attr.RootDirectory = subkey;
1789 pRtlCreateUnicodeStringFromAsciiz(&
str,
"test_subkey2");
1792 pRtlFreeUnicodeString(&
str);
1794 pRtlCreateUnicodeStringFromAsciiz(&
str,
"val");
1798 pRtlFreeUnicodeString(&
str);
1805 ok(
len ==
sizeof(cached_info),
"got unexpected length %d\n",
len);
1806 ok(cached_info.
SubKeys == 1,
"cached_info.SubKeys = %u\n", cached_info.
SubKeys);
1808 ok(cached_info.
Values == 1,
"cached_info.Values = %u\n", cached_info.
Values);
1814 status = pNtDeleteKey(subkey2);
1816 status = pNtDeleteKey(subkey);
1856 pRtlCreateUnicodeStringFromAsciiz(&
str,
"test_subkey");
1859 pRtlFreeUnicodeString(&
str);
1871 status = pNtDeleteKey(subkey);
1893 if (pNtNotifyChangeMultipleKeys)
1899 status = pNtNotifyChangeMultipleKeys(
key, 0,
NULL,
events[0],
NULL,
NULL, &
iosb,
REG_NOTIFY_CHANGE_NAME,
FALSE,
NULL, 0,
TRUE);
1908 pRtlCreateUnicodeStringFromAsciiz(&
str,
"test_subkey");
1911 pRtlFreeUnicodeString(&
str);
1916 status = pNtDeleteKey(subkey);
1923 win_skip(
"NtNotifyChangeMultipleKeys not available\n");
1932 static const WCHAR winetest[] = {
'\\',
'W',
'i',
'n',
'e',
'T',
'e',
's',
't',0};
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
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)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
const char * wine_dbgstr_wn(const WCHAR *str, int n)
#define GetProcAddress(x, y)
#define GetCurrentProcess()
#define HeapFree(x, y, z)
static const WCHAR valueW[]
static const WCHAR linkW[]
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLsizei GLsizei * length
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
_In_ GUID _In_ PVOID ValueData
static const WCHAR emptyW[]
#define OBJ_CASE_INSENSITIVE
@ ProcessWow64Information
REFIID LPVOID DWORD_PTR dw
NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE, ULONG, PVOID, SIZE_T)
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
NTSYSAPI NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR)
#define memcpy(s1, s2, n)
static PIO_STATUS_BLOCK iosb
static const LARGE_INTEGER *static HMODULE hntdll
struct _KEY_VALUE_BASIC_INFORMATION KEY_VALUE_BASIC_INFORMATION
static UNICODE_STRING value_str
static IN IN POBJECT_ATTRIBUTES
#define NTDLL_GET_PROC(func)
struct _KEY_VALUE_FULL_INFORMATION KEY_VALUE_FULL_INFORMATION
static ACCESS_MASK access
#define InitializeObjectAttributes(p, n, a, r, s)
static ACCESS_MASK const OBJECT_ATTRIBUTES * attr
static void test_long_value_name(void)
@ KeyValuePartialInformationAlign64
@ KeyValueBasicInformation
@ KeyValueFullInformationAlign64
static void test_redirection(void)
static void test_symlinks(void)
static void test_NtQueryKey(void)
static ULONG DWORD void *static PIO_STATUS_BLOCK
static ACCESS_MASK const OBJECT_ATTRIBUTES ULONG const UNICODE_STRING ULONG PULONG dispos
static void test_RtlCheckRegistryKey(void)
static UNICODE_STRING winetestpath
static ACCESS_MASK const OBJECT_ATTRIBUTES ULONG const UNICODE_STRING ULONG options
static void test_NtOpenKey(void)
static void test_NtSetValueKey(void)
#define RTL_REGISTRY_ABSOLUTE
static ACCESS_MASK const OBJECT_ATTRIBUTES ULONG TitleIndex
static const DWORD ptr_size
struct _RTL_QUERY_REGISTRY_TABLE * PRTL_QUERY_REGISTRY_TABLE
static void test_RtlpNtQueryValueKey(void)
static void test_notify(void)
#define check_key_value(root, name, flags, expect)
static void test_NtDeleteKey(void)
struct _KEY_VALUE_PARTIAL_INFORMATION KEY_VALUE_PARTIAL_INFORMATION
static ULONG DWORD void *static PIO_APC_ROUTINE
static KEY_INFORMATION_CLASS
static void _check_key_value(int line, HANDLE root, const char *name, DWORD flags, DWORD expect)
static IN PUNICODE_STRING
struct _KEY_VALUE_PARTIAL_INFORMATION * PKEY_VALUE_PARTIAL_INFORMATION
struct _KEY_VALUE_BASIC_INFORMATION * PKEY_VALUE_BASIC_INFORMATION
static const WCHAR stringW[]
enum _KEY_VALUE_INFORMATION_CLASS KEY_VALUE_INFORMATION_CLASS
static NTSTATUS WINAPI QueryRoutine(IN PCWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
static void test_RtlOpenCurrentUser(void)
struct _RTL_QUERY_REGISTRY_TABLE RTL_QUERY_REGISTRY_TABLE
static DWORD get_key_value(HANDLE root, const char *name, DWORD flags)
static void test_RtlQueryRegistryValues(void)
static BOOL InitFunctionPtrs(void)
#define RTL_QUERY_REGISTRY_NOVALUE
#define RTL_REGISTRY_OPTIONAL
static void test_NtFlushKey(void)
struct _KEY_VALUE_FULL_INFORMATION * PKEY_VALUE_FULL_INFORMATION
static void test_NtQueryLicenseKey(void)
static void test_NtCreateKey(void)
static void test_NtQueryValueKey(void)
NTSYSAPI NTSTATUS NTAPI RtlOpenCurrentUser(_In_ ACCESS_MASK DesiredAccess, _Out_ PHANDLE KeyHandle)
_In_ PCWSTR _Inout_ _At_ QueryTable EntryContext
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
NTSYSAPI NTSTATUS NTAPI RtlFormatCurrentUserKeyPath(_Out_ _At_(KeyPath->Buffer, __drv_allocatesMem(Mem) _Post_bytecap_(KeyPath->MaximumLength) _Post_bytecount_(KeyPath->Length)) PUNICODE_STRING KeyPath)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSAPI NTSTATUS NTAPI NtSetValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN ULONG TitleIndex OPTIONAL, IN ULONG Type, IN PVOID Data, IN ULONG DataSize)
#define REG_OPTION_OPEN_LINK
_KEY_VALUE_INFORMATION_CLASS
@ KeyValuePartialInformation
@ KeyValueFullInformation
NTSYSAPI NTSTATUS NTAPI NtDeleteValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName)
#define REG_OPTION_CREATE_LINK
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI NtQueryValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, IN PULONG ResultLength)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSYSAPI NTSTATUS NTAPI NtWaitForSingleObject(IN HANDLE hObject, IN BOOLEAN bAlertable, IN PLARGE_INTEGER Timeout)
NTSTATUS NTAPI NtDeleteKey(IN HANDLE KeyHandle)
NTSTATUS NTAPI NtNotifyChangeKey(IN HANDLE KeyHandle, IN HANDLE Event, IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, IN PVOID ApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG CompletionFilter, IN BOOLEAN WatchTree, OUT PVOID Buffer, IN ULONG Length, IN BOOLEAN Asynchronous)
NTSTATUS NTAPI NtCreateKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN ULONG TitleIndex, IN PUNICODE_STRING Class OPTIONAL, IN ULONG CreateOptions, OUT PULONG Disposition OPTIONAL)
NTSTATUS NTAPI NtFlushKey(IN HANDLE KeyHandle)
NTSTATUS NTAPI NtQueryKey(IN HANDLE KeyHandle, IN KEY_INFORMATION_CLASS KeyInformationClass, OUT PVOID KeyInformation, IN ULONG Length, OUT PULONG ResultLength)
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
#define STATUS_INVALID_HANDLE
#define STATUS_OBJECT_PATH_SYNTAX_BAD
#define STATUS_ACCESS_VIOLATION
#define STATUS_NAME_TOO_LONG
#define STATUS_OBJECT_TYPE_MISMATCH
NTSTATUS NTAPI RtlpNtQueryValueKey(IN HANDLE KeyHandle, OUT PULONG Type OPTIONAL, OUT PVOID Data OPTIONAL, IN OUT PULONG DataLength OPTIONAL, IN ULONG Unused)
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
#define FIELD_OFFSET(t, f)
#define RtlZeroMemory(Destination, Length)
#define STATUS_ACCESS_DENIED
#define STATUS_OBJECT_PATH_NOT_FOUND
#define STATUS_INVALID_PARAMETER
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_OBJECT_NAME_NOT_FOUND
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG _Out_opt_ PULONG ValueType
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength
DWORD WINAPI GetLastError(void)
#define REG_NOTIFY_CHANGE_NAME
RTL_QUERY_REGISTRY_ROUTINE * PRTL_QUERY_REGISTRY_ROUTINE