30#define WIN32_NO_STATUS
38#define REG_APP_HIVE 0x10
42static const WCHAR stringW[] = {
's',
't',
'r',
'i',
'n',
'g',
'W', 0};
44#define STR_TRUNC_SIZE (sizeof(stringW)-2*sizeof(*stringW))
46#ifndef __WINE_WINTERNL_H
49#define RTL_REGISTRY_ABSOLUTE 0
50#define RTL_REGISTRY_SERVICES 1
51#define RTL_REGISTRY_CONTROL 2
52#define RTL_REGISTRY_WINDOWS_NT 3
53#define RTL_REGISTRY_DEVICEMAP 4
54#define RTL_REGISTRY_USER 5
56#define RTL_REGISTRY_HANDLE 0x40000000
57#define RTL_REGISTRY_OPTIONAL 0x80000000
59#define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
60#define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
61#define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
62#define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
63#define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
64#define RTL_QUERY_REGISTRY_DIRECT 0x00000020
65#define RTL_QUERY_REGISTRY_DELETE 0x00000040
115#define InitializeObjectAttributes(p,n,a,r,s) \
117 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
118 (p)->RootDirectory = r; \
119 (p)->Attributes = a; \
120 (p)->ObjectName = n; \
121 (p)->SecurityDescriptor = s; \
122 (p)->SecurityQualityOfService = NULL; \
170#define NTDLL_GET_PROC(func) \
171 p ## func = (void*)GetProcAddress(hntdll, #func); \
173 trace("GetProcAddress(%s) failed\n", #func); \
174 FreeLibrary(hntdll); \
182 trace(
"Could not load ntdll.dll\n");
266 pRtlCreateUnicodeStringFromAsciiz( &
str,
"Machine" );
272 pRtlFreeUnicodeString( &
str );
275 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\Machine" );
278 "NtOpenKey Failed: 0x%08lx\n",
status);
285 pRtlFreeUnicodeString( &
str );
287 pRtlCreateUnicodeStringFromAsciiz( &
str,
"" );
290 pRtlFreeUnicodeString( &
str );
292 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\" );
295 pRtlFreeUnicodeString( &
str );
297 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\\\\\" );
300 pRtlFreeUnicodeString( &
str );
302 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry" );
306 pRtlFreeUnicodeString( &
str );
308 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\" );
312 pRtlFreeUnicodeString( &
str );
314 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\\\" );
318 pRtlFreeUnicodeString( &
str );
320 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Foobar" );
323 pRtlFreeUnicodeString( &
str );
325 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Foobar\\Machine" );
328 pRtlFreeUnicodeString( &
str );
330 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Machine\\Software\\Classes" );
333 pRtlFreeUnicodeString( &
str );
335 pRtlCreateUnicodeStringFromAsciiz( &
str,
"Machine\\Software\\Classes" );
338 pRtlFreeUnicodeString( &
str );
340 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Device\\Null" );
343 pRtlFreeUnicodeString( &
str );
351 pRtlInitUnicodeString( &
str,
L"\xf6\xf3\x14d\x371\xd801\xdc00" );
356 if (pNtOpenKeyEx ==
NULL)
359 win_skip(
"NtOpenKeyEx not available\n");
363 pRtlInitUnicodeString( &
str,
L"\xd6\xd3\x14c\x370\xd801\xdc28" );
366 pRtlInitUnicodeString( &
str,
L"\xd6\xd3\x14c\x370\xd801\xdc00" );
370 pNtDeleteKey( subkey );
376 win_skip(
"NtOpenKeyEx not available\n");
399 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got: 0x%08lx\n",
status);
408 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got: 0x%08lx\n",
status);
419 "Expected STATUS_ACCESS_VIOLATION or STATUS_ACCESS_DENIED, got: 0x%08lx\n",
status);
433 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test\\sub\\key" );
434 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
436 pRtlFreeUnicodeString( &
str );
438 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test\\subkey" );
439 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
441 pRtlFreeUnicodeString( &
str );
443 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test\\\\subkey" );
444 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
446 pRtlFreeUnicodeString( &
str );
448 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test\\subkey\\" );
449 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
451 pRtlFreeUnicodeString( &
str );
453 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test_subkey\\" );
454 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
457 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test_subkey\\" );
458 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
460 pNtDeleteKey( subkey );
462 pRtlFreeUnicodeString( &
str );
464 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test_subkey2\\\\" );
465 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
467 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test_subkey2\\\\test\\\\" );
468 status = pNtCreateKey( &subkey2, am, &
attr, 0, 0, 0, 0 );
470 pRtlFreeUnicodeString( &
str );
471 pNtDeleteKey( subkey2 );
473 pNtDeleteKey( subkey );
476 pRtlCreateUnicodeStringFromAsciiz( &
str,
"test_subkey" );
477 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
479 pRtlFreeUnicodeString( &
str );
480 pNtDeleteKey( subkey );
483 attr.RootDirectory = 0;
486 pRtlCreateUnicodeStringFromAsciiz( &
str,
"" );
487 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
489 pRtlFreeUnicodeString( &
str );
491 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\" );
492 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
494 pRtlFreeUnicodeString( &
str );
496 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry" );
497 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
499 "NtCreateKey failed: 0x%08lx\n",
status );
500 if (!
status) pNtClose( subkey );
501 pRtlFreeUnicodeString( &
str );
503 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\" );
504 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
506 "NtCreateKey failed: 0x%08lx\n",
status );
507 if (!
status) pNtClose( subkey );
508 pRtlFreeUnicodeString( &
str );
510 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\\\" );
511 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
513 "NtCreateKey failed: 0x%08lx\n",
status );
514 if (!
status) pNtClose( subkey );
515 pRtlFreeUnicodeString( &
str );
517 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Foobar" );
518 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
520 pRtlFreeUnicodeString( &
str );
522 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Foobar\\Machine" );
523 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
525 pRtlFreeUnicodeString( &
str );
527 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Machine\\Software\\Classes" );
528 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
530 pRtlFreeUnicodeString( &
str );
532 pRtlCreateUnicodeStringFromAsciiz( &
str,
"Machine\\Software\\Classes" );
533 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
535 pRtlFreeUnicodeString( &
str );
537 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Device\\Null" );
538 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
540 pRtlFreeUnicodeString( &
str );
542 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\Machine\\Software\\Classes" );
543 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
545 "NtCreateKey failed: 0x%08lx\n",
status );
546 if (!
status) pNtClose( subkey );
547 pRtlFreeUnicodeString( &
str );
552 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\Registry\\Machine\\Software\\Classes" );
553 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
555 "NtCreateKey failed: 0x%08lx\n",
status );
556 if (!
status) pNtClose( subkey );
557 pRtlFreeUnicodeString( &
str );
559 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\REGISTRY\\Machine\\Software\\Classes" );
560 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
562 "NtCreateKey failed: 0x%08lx\n",
status );
563 if (!
status) pNtClose( subkey );
564 pRtlFreeUnicodeString( &
str );
566 pRtlCreateUnicodeStringFromAsciiz( &
str,
"\\REGISTRY\\MACHINE\\SOFTWARE\\CLASSES" );
567 status = pNtCreateKey( &subkey, am, &
attr, 0, 0, 0, 0 );
569 "NtCreateKey failed: 0x%08lx\n",
status );
570 if (!
status) pNtClose( subkey );
571 pRtlFreeUnicodeString( &
str );
589 pRtlCreateUnicodeStringFromAsciiz(&ValName,
"deletetest");
592 pRtlFreeUnicodeString(&ValName);
594 pRtlCreateUnicodeStringFromAsciiz(&ValName,
"stringtest");
597 pRtlFreeUnicodeString(&ValName);
646 pNtOpenKey(&hkey, am, &
attr);
648 status = pNtFlushKey(hkey);
666 pRtlCreateUnicodeStringFromAsciiz(&ValName,
"deletetest");
676 ok(basic_info->
TitleIndex == 0,
"NtQueryValueKey returned wrong TitleIndex %ld\n", basic_info->
TitleIndex);
677 ok(basic_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %ld\n", basic_info->
Type);
678 ok(basic_info->
NameLength == 20,
"NtQueryValueKey returned wrong NameLength %ld\n", basic_info->
NameLength);
684 ok(basic_info->
TitleIndex == 0,
"NtQueryValueKey returned wrong TitleIndex %ld\n", basic_info->
TitleIndex);
685 ok(basic_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %ld\n", basic_info->
Type);
686 ok(basic_info->
NameLength == 20,
"NtQueryValueKey returned wrong NameLength %ld\n", basic_info->
NameLength);
695 ok(partial_info->
TitleIndex == 0,
"NtQueryValueKey returned wrong TitleIndex %ld\n", partial_info->
TitleIndex);
696 ok(partial_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %ld\n", partial_info->
Type);
697 ok(partial_info->
DataLength == 4,
"NtQueryValueKey returned wrong DataLength %ld\n", partial_info->
DataLength);
703 ok(partial_info->
TitleIndex == 0,
"NtQueryValueKey returned wrong TitleIndex %ld\n", partial_info->
TitleIndex);
704 ok(partial_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %ld\n", partial_info->
Type);
705 ok(partial_info->
DataLength == 4,
"NtQueryValueKey returned wrong DataLength %ld\n", partial_info->
DataLength);
707 ok(*(
DWORD *)partial_info->
Data == 711,
"incorrect Data returned: 0x%lx\n", *(
DWORD *)partial_info->
Data);
716 ok(aligned_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %ld\n", aligned_info->
Type);
717 ok(aligned_info->
DataLength == 4,
"NtQueryValueKey returned wrong DataLength %ld\n", aligned_info->
DataLength);
724 ok(aligned_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %ld\n", aligned_info->
Type);
725 ok(aligned_info->
DataLength == 4,
"NtQueryValueKey returned wrong DataLength %ld\n", aligned_info->
DataLength);
732 ok(aligned_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %ld\n", aligned_info->
Type);
733 ok(aligned_info->
DataLength == 4,
"NtQueryValueKey returned wrong DataLength %ld\n", aligned_info->
DataLength);
735 ok(*(
DWORD *)aligned_info->
Data == 711,
"incorrect Data returned: 0x%lx\n", *(
DWORD *)aligned_info->
Data);
740 ok(aligned_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %ld\n", aligned_info->
Type);
741 ok(aligned_info->
DataLength == 4,
"NtQueryValueKey returned wrong DataLength %ld\n", aligned_info->
DataLength);
743 ok(*(
DWORD *)aligned_info->
Data == 711,
"incorrect Data returned: 0x%lx\n", *(
DWORD *)aligned_info->
Data);
751 ok(full_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %ld\n", full_info->
Type);
753 ok(full_info->
NameLength == 20,
"NtQueryValueKey returned wrong NameLength %ld\n", full_info->
NameLength);
755 "NtQueryValueKey returned wrong len %ld\n",
len);
762 ok(full_info->
Type ==
REG_DWORD,
"NtQueryValueKey returned wrong Type %ld\n", full_info->
Type);
764 ok(full_info->
NameLength == 20,
"NtQueryValueKey returned wrong NameLength %ld\n", full_info->
NameLength);
766 ok(*(
DWORD *)((
char *)full_info + full_info->
DataOffset) == 711,
"incorrect Data returned: 0x%lx\n",
770 pRtlFreeUnicodeString(&ValName);
771 pRtlCreateUnicodeStringFromAsciiz(&ValName,
"stringtest");
779 ok(partial_info->
TitleIndex == 0,
"NtQueryValueKey returned wrong TitleIndex %ld\n", partial_info->
TitleIndex);
780 ok(partial_info->
Type ==
REG_SZ,
"NtQueryValueKey returned wrong Type %ld\n", partial_info->
Type);
800 pRtlFreeUnicodeString(&ValName);
802 pRtlCreateUnicodeStringFromAsciiz(&ValName,
"custtest");
803 status = pNtSetValueKey(
key, &ValName, 0, 0xff00ff00,
NULL, 0);
808 ok(
pi.Type == 0xff00ff00,
"Type=%lx\n",
pi.Type);
809 ok(
pi.DataLength == 0,
"DataLength=%lu\n",
pi.DataLength);
810 pRtlFreeUnicodeString(&ValName);
816static void delete_subkeys_and_values(
HKEY hkey)
826 printf(
"got subkey %wZ\n", &
string);
831 delete_subkeys_and_values(hsubkey);
832 status = pNtDeleteKey(hsubkey);
842 printf(
"Deleting value %wZ\n", &
string);
867 status = pNtDeleteKey(hkey);
873 delete_subkeys_and_values(hkey);
874 status = pNtDeleteKey(hkey);
885 pRtlInitUnicodeString(&
string,
L"value");
892 status = pNtSetValueKey(hkey, &
string, 0,
REG_SZ,
"test", 5);
895 status = pNtDeleteValueKey(hkey, &
string);
898 status = pNtDeleteKey(hkey);
921 static const WCHAR emptyW[] = {
'E',
'M',
'P',
'T',
'Y',0};
928 if (!pNtQueryLicenseValue)
930 win_skip(
"NtQueryLicenseValue not found, skipping tests\n");
939 ok(
type == 0xdead,
"expected unmodified value for type, got %lu\n",
type);
940 ok(
len == 0xbeef,
"expected unmodified value for len, got %lu\n",
len);
943 pRtlCreateUnicodeStringFromAsciiz(&
name,
"");
949 ok(
type == 0xdead,
"expected unmodified value for type, got %lu\n",
type);
950 ok(
len == 0xbeef,
"expected unmodified value for len, got %lu\n",
len);
955 ok(
type == 0xdead,
"expected unmodified value for type, got %lu\n",
type);
960 ok(
len == 0xbeef,
"expected unmodified value for len, got %lu\n",
len);
966 ok(
type == 0xdead,
"expected unmodified value for type, got %lu\n",
type);
967 ok(
len == 0xbeef,
"expected unmodified value for len, got %lu\n",
len);
969 pRtlFreeUnicodeString(&
name);
972 pRtlCreateUnicodeStringFromAsciiz(&
name,
"Nonexistent-License-Value");
978 ok(
type == 0xdead,
"expected unmodified value for type, got %lu\n",
type);
979 ok(
len == 0xbeef,
"expected unmodified value for len, got %lu\n",
len);
984 ok(
type == 0xdead,
"expected unmodified value for type, got %lu\n",
type);
989 ok(
len == 0xbeef ||
broken(!
len) ,
"expected unmodified value for len, got %lu\n",
len);
995 ok(
type == 0xdead,
"expected unmodified value for type, got %lu\n",
type);
996 ok(
len == 0xbeef ||
broken(!
len) ,
"expected unmodified value for len, got %lu\n",
len);
998 pRtlFreeUnicodeString(&
name);
1001 pRtlCreateUnicodeStringFromAsciiz(&
name,
"Kernel-MUI-Language-Allowed");
1007 ok(
type == 0xdead,
"expected unmodified value for type, got %lu\n",
type);
1008 ok(
len == 0xbeef,
"expected unmodified value for len, got %lu\n",
len);
1013 ok(
type == 0xdead,
"expected unmodified value for type, got %lu\n",
type);
1043 ok(
buffer[0] == 0x1111,
"expected buffer[0] = 0x1111, got %u\n",
buffer[0]);
1045 pRtlFreeUnicodeString(&
name);
1048 pRtlCreateUnicodeStringFromAsciiz(&
name,
"Kernel-MUI-Number-Allowed");
1054 ok(
type == 0xdead,
"expected unmodified value for type, got %lu\n",
type);
1055 ok(
len == 0xbeef,
"expected unmodified value for len, got %lu\n",
len);
1060 ok(
type == 0xdead,
"expected unmodified value for type, got %lu\n",
type);
1081 ok(
value != 0xdeadbeef,
"expected value != 0xdeadbeef\n");
1090 pRtlFreeUnicodeString(&
name);
1103 static const WCHAR linkW[] = {
'l',
'i',
'n',
'k',0};
1104 static const WCHAR valueW[] = {
'v',
'a',
'l',
'u',
'e',0};
1105 static const WCHAR symlinkW[] = {
'S',
'y',
'm',
'b',
'o',
'l',
'i',
'c',
'L',
'i',
'n',
'k',
'V',
'a',
'l',
'u',
'e',0};
1106 static const WCHAR targetW[] = {
'\\',
't',
'a',
'r',
'g',
'e',
't',0};
1117 pRtlInitUnicodeString( &link_str,
linkW );
1118 pRtlInitUnicodeString( &symlink_str, symlinkW );
1119 pRtlInitUnicodeString( &target_str, targetW + 1 );
1128 attr.RootDirectory = 0;
1129 attr.Attributes = 0;
1132 attr.SecurityQualityOfService =
NULL;
1138 attr.ObjectName = &link_str;
1153 attr.ObjectName = &link_str;
1159 attr.ObjectName = &target_str;
1168 attr.ObjectName = &link_str;
1187 "wrong len %lu\n",
len );
1188 status = pNtDeleteValueKey(
key, &symlink_str );
1193 attr.Attributes = 0;
1210 attr.ObjectName = &link_str;
1218 "wrong len %lu\n",
len );
1231 "wrong len %lu\n",
len );
1241 "wrong len %lu\n",
len );
1244 attr.Attributes = 0;
1261 "wrong len %lu\n",
len );
1265 attr.ObjectName = &target_str;
1272 attr.ObjectName = &link_str;
1273 attr.Attributes = 0;
1281 attr.ObjectName = &target_str;
1292 attr.ObjectName = &null_str;
1299 "wrong len %lu\n",
len );
1308 "wrong len %lu\n",
len );
1315 attr.Attributes = 0;
1316 attr.ObjectName = &null_str;
1336 attr.Attributes = 0;
1337 attr.ObjectName = &link_str;
1344 attr.ObjectName = &link_str;
1347 "NtOpenKey wrong status 0x%08lx\n",
status );
1358 attr.ObjectName = &target_str;
1371 target, target_len +
sizeof(targetW) -
sizeof(
WCHAR) );
1376 "NtOpenKey failed: 0x%08lx\n",
status );
1413 attr.SecurityQualityOfService =
NULL;
1414 pRtlCreateUnicodeStringFromAsciiz( &
str,
name );
1429 pRtlFreeUnicodeString( &
str );
1438#define check_key_value(root,name,flags,expect) _check_key_value( __LINE__, root, name, flags, expect )
1442 static const WCHAR wineW[] = {
'W',
'i',
'n',
'e'};
1455 attr.RootDirectory = 0;
1459 attr.SecurityQualityOfService =
NULL;
1461 pRtlInitUnicodeString( &
str,
name );
1471 ok_( __FILE__,
line )( full_info->
SubKeys == subkeys,
"wrong number of subkeys: %lu\n", full_info->
SubKeys );
1475 for (
i = 0;
i < subkeys;
i++)
1483 ok_( __FILE__,
line )( found == present,
"found equals %d\n", found );
1491 ok_( __FILE__,
line )( full_info->
SubKeys == subkeys,
"wrong number of subkeys: %lu\n", full_info->
SubKeys );
1495 for (
i = 0;
i < subkeys;
i++)
1503 ok_( __FILE__,
line )( found == present,
"found equals %d\n", found );
1506#define check_enum_value(name, flags, subkeys, present) _check_enum_value( __LINE__, name, flags, subkeys, present )
1518 int subkeys64, subkeys32;
1527 trace(
"Not on Wow64, no redirection\n" );
1533 attr.RootDirectory = 0;
1537 attr.SecurityQualityOfService =
NULL;
1539 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Wine" );
1543 skip(
"Not authorized to modify KEY_WOW64_64KEY, no redirection\n");
1548 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Wow6432Node\\Wine" );
1552 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Wine\\Winetest" );
1556 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Wow6432Node\\Wine\\Winetest" );
1572 ok(
dw == 32,
"wrong value %lu\n",
dw );
1578 ok(
dw == 64,
"wrong value %lu\n",
dw );
1580 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software" );
1614 check_key_value( 0,
"\\Registry\\Machine\\Software\\Wow6432Node\\Wine\\Winetest", 0, 32 );
1620 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Wow6432Node" );
1642 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Wow6432Node\\Wine" );
1664 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Wine" );
1686 status = pNtDeleteKey( key32 );
1690 status = pNtDeleteKey( key64 );
1694 pRtlInitUnicodeString( &
str,
L"Winetest" );
1695 attr.RootDirectory = root64;
1699 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Wow6432Node\\Wine\\Winetest" );
1700 attr.RootDirectory = 0;
1703 "NtOpenKey failed: 0x%08lx\n",
status );
1706 status = pNtDeleteKey( key32 );
1710 pNtDeleteKey( root32 );
1712 pNtDeleteKey( root64 );
1717 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Classes\\Wine" );
1721 skip(
"Not authorized to modify the Classes key\n");
1726 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Classes\\Wow6432Node\\Wine" );
1729 "NtOpenKey failed: 0x%08lx\n",
status );
1734 "NtOpenKey failed: 0x%08lx\n",
status );
1748 check_key_value( 0,
"\\Registry\\Machine\\Software\\Classes\\Wine", 0, 64 );
1751 check_key_value( 0,
"\\Registry\\Machine\\Software\\Classes\\Wow6432Node\\Wine", 0,
ptr_size == 64 ? 32 : 64 );
1755 pNtDeleteKey( key32 );
1761 check_key_value( 0,
"\\Registry\\Machine\\Software\\Classes\\Wow6432Node\\Wine", 0, 0 );
1765 pNtDeleteKey( key64 );
1768 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Classes" );
1775 pRtlInitUnicodeString( &
str,
L"Wine" );
1776 attr.RootDirectory = root64;
1780 attr.RootDirectory = key64;
1783 pNtDeleteKey(
key );
1786 attr.RootDirectory = root32;
1813 pNtDeleteKey( key32 );
1823 pNtDeleteKey( key64 );
1826 attr.RootDirectory = root32;
1841 pNtDeleteKey( key32 );
1847 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Classes" );
1848 attr.RootDirectory = 0;
1858 pRtlInitUnicodeString( &
str,
L"Interface" );
1859 attr.RootDirectory = root64;
1863 attr.RootDirectory = root32;
1879 pRtlInitUnicodeString( &
str,
L"Wine" );
1880 attr.RootDirectory = root32;
1889 pNtDeleteKey( key32 );
1892 attr.RootDirectory = root64;
1899 "NtOpenKey failed: 0x%08lx\n",
status );
1902 pNtDeleteKey( key64 );
1905 pNtDeleteKey(
root );
1908 attr.RootDirectory = root64;
1912 attr.RootDirectory = root32;
1915 "NtOpenKey failed: 0x%08lx\n",
status );
1920 "NtOpenKey failed: 0x%08lx\n",
status );
1941 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Classes\\Interface" );
1942 attr.RootDirectory = 0;
1961 pNtDeleteKey( key32 );
1971 check_key_value( 0,
"\\Registry\\Machine\\Software\\Classes\\Interface\\Wine", 0, 0 );
1975 pNtDeleteKey( key64 );
1978 pRtlInitUnicodeString( &
str,
L"Wine" );
1979 attr.RootDirectory = root32;
1994 pNtDeleteKey( key32 );
2000 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Classes\\Wow6432Node\\Wine" );
2001 attr.RootDirectory = 0;
2015 "NtOpenKey failed: 0x%08lx\n",
status );
2018 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Classes\\Wine" );
2021 "NtOpenKey failed: 0x%08lx\n",
status );
2026 "NtOpenKey failed: 0x%08lx\n",
status );
2031 "NtOpenKey failed: 0x%08lx\n",
status );
2034 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Classes\\Wow6432Node" );
2040 ok( full_info->
SubKeys > 0,
"wrong number of subkeys: %lu\n", full_info->
SubKeys );
2041 subkeys32 = full_info->
SubKeys;
2044 pRtlInitUnicodeString( &
str,
L"\\Registry\\Machine\\Software\\Classes" );
2050 ok( full_info->
SubKeys > subkeys32,
"wrong number of subkeys: %lu\n", full_info->
SubKeys );
2051 subkeys64 = full_info->
SubKeys;
2073 pNtDeleteKey( key32 );
2096 status = pNtDeleteValueKey(
key, &ValName);
2104 pRtlFreeUnicodeString(&ValName);
2125 win_skip(
"KeyNameInformation is not supported\n");
2159 str.Length =
info->NameLength;
2161 "got %s, expected %s\n",
2169 pRtlCreateUnicodeStringFromAsciiz(&
str,
"test_subkey");
2172 pRtlFreeUnicodeString(&
str);
2179 ok(
len ==
sizeof(cached_info),
"got unexpected length %ld\n",
len);
2180 ok(cached_info.
SubKeys == 0,
"cached_info.SubKeys = %lu\n", cached_info.
SubKeys);
2182 ok(cached_info.
Values == 0,
"cached_info.Values = %lu\n", cached_info.
Values);
2188 attr.RootDirectory = subkey;
2190 pRtlCreateUnicodeStringFromAsciiz(&
str,
"test_subkey2");
2193 pRtlFreeUnicodeString(&
str);
2195 pRtlCreateUnicodeStringFromAsciiz(&
str,
"val");
2199 pRtlFreeUnicodeString(&
str);
2206 ok(
len ==
sizeof(cached_info),
"got unexpected length %ld\n",
len);
2207 ok(cached_info.
SubKeys == 1,
"cached_info.SubKeys = %lu\n", cached_info.
SubKeys);
2209 ok(cached_info.
Values == 1,
"cached_info.Values = %lu\n", cached_info.
Values);
2215 status = pNtDeleteKey(subkey2);
2217 status = pNtDeleteKey(subkey);
2259 pRtlCreateUnicodeStringFromAsciiz(&
str,
"test_subkey");
2262 pRtlFreeUnicodeString(&
str);
2291 status = pNtDeleteKey(subkey);
2321 if (pNtNotifyChangeMultipleKeys)
2327 status = pNtNotifyChangeMultipleKeys(
key, 0,
NULL,
events[0],
NULL,
NULL, &
iosb,
REG_NOTIFY_CHANGE_NAME,
FALSE,
NULL, 0,
TRUE);
2335 pRtlCreateUnicodeStringFromAsciiz(&
str,
"test_subkey");
2338 pRtlFreeUnicodeString(&
str);
2343 status = pNtDeleteKey(subkey);
2350 win_skip(
"NtNotifyChangeMultipleKeys not available\n");
2360 static const WCHAR key1[] = {
'\\',
'R',
't',
'l',
'C',
'r',
'e',
'a',
't',
'e',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'K',
'e',
'y',0};
2369 pRtlAppendUnicodeToString(&
str,
key1);
2370 pRtlAppendUnicodeToString(&
str,
key1);
2424 pRtlFreeUnicodeString(&
str);
2447 pRtlCreateUnicodeStringFromAsciiz(&
str,
"rename_subkey");
2455 pRtlCreateUnicodeStringFromAsciiz(&
str2,
"renamed_subkey");
2474 pRtlFreeUnicodeString(&
str2);
2475 pRtlFreeUnicodeString(&
str);
2486 pNtDeleteKey(subkey);
2507 tp.PrivilegeCount = 1;
2508 tp.Privileges[0].Luid = luid;
2513 tp.Privileges[0].Attributes = 0;
2537 win_skip(
"Skipping tests for NtLoadKeyEx on pre-NT6\n");
2550 win_skip(
"Failed to set SE_RESTORE_NAME and SE_BACKUP_NAME privileges, skipping tests\n");
2566 pRtlFormatCurrentUserKeyPath(&key_pathW);
2570 pRtlAppendUnicodeToString(&key_pathW,
L"TestKey");
2578 win_skip(
"NtLoadKeyEx has a different order of parameters in this windows version\n");
2584 ok(!
key,
"key is expected to be null\n");
2626#if !defined(__REACTOS__) || (DLL_EXPORT_VERSION >= _WIN32_WINNT_WIN7)
2630 void *
context,
void *entry_context)
2635 ULONG expected_size;
2647 ok(!value_name,
"Expected null name\n");
2656 expected_size =
query->DefaultLength;
2662 expected_size =
test->expected_data_size;
2680 ok(value_data_size == expected_size,
"Expected size %lu, got %lu\n", expected_size, value_data_size);
2996 L"%SYSTEMDRIVE%",
sizeof(
L"%SYSTEMDRIVE%"));
3000 L"Brussels\0Paris\0%PATH%",
sizeof(
L"Brussels\0Paris\0%PATH%") -
sizeof(
L'\0'));
3012 L"Yellow",
sizeof(
L"Yellow"));
3020 ULONG expected_size;
3056 ok(
status ==
test->expected_ret,
"Expected RtlQueryRegistryValues to return 0x%08lx, got 0x%08lx\n",
3071 expected_size =
query->DefaultLength;
3077 expected_size =
test->expected_data_size;
3084 else if (expected_size == -1)
3089 "Expected size %lu, got %Iu\n", expected_size,
3104 "Data does not match\n");
3115 "Data does not match\n");
3119 if (expected_size == -1)
3133 "Data does not match\n");
3149#if !defined(__REACTOS__) || (DLL_EXPORT_VERSION >= _WIN32_WINNT_WIN7)
3180#if !defined(__REACTOS__) || (DLL_EXPORT_VERSION >= _WIN32_WINNT_WIN7)
COMPILER_DEPENDENT_UINT64 UINT64
EXTERN_C NTSTATUS WINAPI NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG)
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)
@ ProcessWow64Information
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define STATUS_INVALID_HANDLE
#define STATUS_OBJECT_TYPE_MISMATCH
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
LSTATUS WINAPI RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey)
LONG WINAPI RegSaveKeyW(HKEY hKey, LPCWSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
LONG WINAPI RegDeleteKeyValueW(IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValueName OPTIONAL)
LONG WINAPI RegSetKeyValueW(IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValueName OPTIONAL, IN DWORD dwType, IN LPCVOID lpData OPTIONAL, IN DWORD cbData)
BOOL WINAPI LookupPrivilegeValueA(LPCSTR lpSystemName, LPCSTR lpName, PLUID lpLuid)
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
static const WCHAR empty[1]
#define GetProcAddress(x, y)
#define GetCurrentProcess()
#define HeapFree(x, y, z)
static const WCHAR valueW[]
static const WCHAR linkW[]
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
_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 wchar_t *__cdecl wcsstr(const wchar_t *, const wchar_t *)
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
struct _UNICODE_STRING UNICODE_STRING
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
#define STATUS_ACCESS_VIOLATION
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLsizei GLsizei * length
GLuint64EXT GLuint GLuint GLenum GLenum GLuint GLuint GLenum GLuint GLuint key1
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[]
REFIID LPVOID DWORD_PTR dw
#define todo_wine_if(is_todo)
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)
#define ERROR_FILE_NOT_FOUND
static PROCESS_INFORMATION pi
static PIO_STATUS_BLOCK iosb
struct _KEY_VALUE_BASIC_INFORMATION KEY_VALUE_BASIC_INFORMATION
static UNICODE_STRING value_str
static IN IN POBJECT_ATTRIBUTES
#define check_enum_value(name, flags, subkeys, present)
static unsigned int query_routine_calls
#define NTDLL_GET_PROC(func)
static BOOL set_privileges(LPCSTR privilege, BOOL set)
struct _KEY_VALUE_FULL_INFORMATION KEY_VALUE_FULL_INFORMATION
static void _check_enum_value(int line, const WCHAR *name, DWORD flags, int subkeys, BOOL present)
static ACCESS_MASK access
#define RTL_QUERY_REGISTRY_SUBKEY
#define InitializeObjectAttributes(p, n, a, r, s)
static WCHAR query_reg_values_direct_str_buf[32]
static union @1827 query_reg_values_direct_sized
static ACCESS_MASK const OBJECT_ATTRIBUTES * attr
static const LARGE_INTEGER *static OBJECT_ATTRIBUTES HANDLE IO_STATUS_BLOCK *static HMODULE hntdll
static void test_long_value_name(void)
@ KeyValuePartialInformationAlign64
@ KeyValueBasicInformation
@ KeyValueFullInformationAlign64
static void test_redirection(void)
static void test_symlinks(void)
static struct @1828 query_reg_values_direct_typed
enum _KEY_VALUE_INFORMATION_CLASS KEY_VALUE_INFORMATION_CLASS
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_NtRenameKey(void)
#define RTL_QUERY_REGISTRY_NOEXPAND
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 void test_NtRegLoadKeyEx(void)
static ACCESS_MASK const OBJECT_ATTRIBUTES ULONG TitleIndex
static ULONG ULONG *static OBJECT_INFORMATION_CLASS
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 UNICODE_STRING query_reg_values_direct_str
#define RTL_QUERY_REGISTRY_REQUIRED
static void test_NtDeleteKey(void)
#define RTL_QUERY_REGISTRY_DIRECT
#define RTL_REGISTRY_USER
struct _KEY_VALUE_PARTIAL_INFORMATION KEY_VALUE_PARTIAL_INFORMATION
static ULONG DWORD void *static PIO_APC_ROUTINE
static KEY_INFORMATION_CLASS
static void test_RtlCreateRegistryKey(void)
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[]
static NTSTATUS WINAPI query_routine(const WCHAR *value_name, ULONG value_type, void *value_data, ULONG value_data_size, void *context, void *entry_context)
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)
#define RTL_QUERY_REGISTRY_DELETE
static BOOL InitFunctionPtrs(void)
#define RTL_QUERY_REGISTRY_NOVALUE
#define RTL_REGISTRY_OPTIONAL
static void test_NtFlushKey(void)
static struct query_reg_values_test query_reg_values_tests[]
static ULONG query_reg_values_direct_int
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 RtlCreateRegistryKey(_In_ ULONG RelativeTo, _In_ PWSTR Path)
NTSYSAPI NTSTATUS NTAPI RtlOpenCurrentUser(_In_ ACCESS_MASK DesiredAccess, _Out_ PHANDLE KeyHandle)
_In_ PCWSTR _Inout_ _At_ QueryTable EntryContext
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 BOOLEAN NTAPI RtlDosPathNameToNtPathName_U(_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
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)
struct _KEY_BASIC_INFORMATION * PKEY_BASIC_INFORMATION
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)
NTSYSAPI NTSTATUS NTAPI NtEnumerateKey(IN HANDLE KeyHandle, IN ULONG Index, IN KEY_INFORMATION_CLASS KeyInformationClass, IN PVOID KeyInformation, 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 NtLoadKeyEx(IN POBJECT_ATTRIBUTES TargetKey, IN POBJECT_ATTRIBUTES SourceFile, IN ULONG Flags, IN HANDLE TrustClassKey)
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 NtEnumerateValueKey(IN HANDLE KeyHandle, IN ULONG Index, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, OUT PVOID KeyValueInformation, IN ULONG Length, OUT PULONG ResultLength)
NTSTATUS NTAPI NtRenameKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ReplacementName)
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_writes_bytes_to_opt_(ProcessInformationLength, *ReturnLength) PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
#define STATUS_OBJECT_PATH_SYNTAX_BAD
#define STATUS_KEY_DELETED
#define STATUS_NO_MORE_ENTRIES
#define STATUS_INVALID_PARAMETER_7
#define STATUS_INVALID_PARAMETER_6
#define STATUS_NAME_TOO_LONG
#define OBJ_CASE_INSENSITIVE
#define offsetof(TYPE, MEMBER)
XML_HIDDEN void xmlParserErrors const char const xmlChar const xmlChar * str2
NTSTATUS NTAPI RtlpNtQueryValueKey(IN HANDLE KeyHandle, OUT PULONG Type OPTIONAL, OUT PVOID Data OPTIONAL, IN OUT PULONG DataLength OPTIONAL, IN ULONG Unused)
#define _WIN32_WINNT_WIN7
#define _WIN32_WINNT_VISTA
#define STATUS_CANNOT_DELETE
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
PUNICODE_STRING ObjectName
PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine
enum query_reg_values_test::@1829 flags
unsigned int expected_calls
RTL_QUERY_REGISTRY_TABLE query_table[3]
const WCHAR * expected_data
DWORD WINAPI WaitForMultipleObjects(IN DWORD nCount, IN CONST HANDLE *lpHandles, IN BOOL bWaitAll, IN DWORD dwMilliseconds)
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_DATA_OVERRUN
#define STATUS_OBJECT_PATH_NOT_FOUND
#define STATUS_INVALID_PARAMETER
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_OBJECT_NAME_INVALID
#define STATUS_OBJECT_NAME_NOT_FOUND
struct _OBJECT_ATTRIBUTES OBJECT_ATTRIBUTES
_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)
NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE, ULONG, PVOID, SIZE_T) __WINE_ALLOC_SIZE(4) __WINE_DEALLOC(RtlFreeHeap
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int, const UNICODE_STRING *, UNICODE_STRING *)
NTSYSAPI NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR)
#define HKEY_CURRENT_USER
#define REG_NOTIFY_CHANGE_NAME
RTL_QUERY_REGISTRY_ROUTINE * PRTL_QUERY_REGISTRY_ROUTINE
#define TOKEN_ADJUST_PRIVILEGES
#define SE_PRIVILEGE_ENABLED