14{
19 HANDLE HKLM_Key, HKLM_Software_Key, Test_Key;
20 ULONG FullInformationLength;
25
27 FullInformation =
RtlAllocateHeap(RtlGetProcessHeap(), 0, FullInformationLength);
28 if (!FullInformation)
29 {
30 skip(
"Out of memory\n");
31 return;
32 }
33
35 &HKLM_Name,
41
42 InfoLength = 0x55555555;
46
48 InfoLength = 0x55555555;
56 ok(FullInformation->
SubKeys >= 5 && FullInformation->
SubKeys < 20,
"SubKeys = %lu\n", FullInformation->
SubKeys);
59 ok(FullInformation->
Values != 0x55555555,
"Values = %lu\n", FullInformation->
Values);
62 ok(FullInformation->
Class[0] == 0x5555,
"Class[0] = %u\n", FullInformation->
Class[0]);
63
65 InfoLength = 0x55555555;
70
72 &Software_Name,
74 HKLM_Key,
78
80 InfoLength = 0x55555555;
88 ok(FullInformation->
SubKeys >= 5 && FullInformation->
SubKeys < 1000,
"SubKeys = %lu\n", FullInformation->
SubKeys);
91 ok(FullInformation->
Values != 0x55555555,
"Values = %lu\n", FullInformation->
Values);
94 ok(FullInformation->
Class[0] == 0x5555,
"Class[0] = %u\n", FullInformation->
Class[0]);
95
97 &Test_Name,
99 HKLM_Software_Key,
103
104 InfoLength = 0x55555555;
108
110 InfoLength = 0x55555555;
118 ok(FullInformation->
SubKeys == 0,
"SubKeys = %lu\n", FullInformation->
SubKeys);
121 ok(FullInformation->
Values == 0,
"Values = %lu\n", FullInformation->
Values);
124 ok(FullInformation->
Class[0] == 0x5555,
"Class[0] = %u\n", FullInformation->
Class[0]);
125
127 InfoLength = 0x55555555;
134 ok(FullInformation->
Class[0] ==
L'M',
"Class[0] = %u\n", FullInformation->
Class[0]);
135 ok(FullInformation->
Class[1] == 0x5555,
"Class[1] = %u\n", FullInformation->
Class[1]);
136
138 InfoLength = 0x55555555;
145 ok(FullInformation->
Class[0] ==
L'M',
"Class[0] = %u\n", FullInformation->
Class[0]);
146 ok(FullInformation->
Class[1] ==
L'y',
"Class[1] = %u\n", FullInformation->
Class[1]);
147 ok(FullInformation->
Class[6] == (
L's' | 0x5500),
"Class[6] = %u\n", FullInformation->
Class[6]);
148 ok(FullInformation->
Class[7] == 0x5555,
"Class[7] = %u\n", FullInformation->
Class[7]);
149
151 InfoLength = 0x55555555;
158 ok(FullInformation->
Class[0] ==
L'M',
"Class[0] = %u\n", FullInformation->
Class[0]);
159 ok(FullInformation->
Class[1] ==
L'y',
"Class[1] = %u\n", FullInformation->
Class[1]);
160 ok(FullInformation->
Class[6] ==
L's',
"Class[6] = %u\n", FullInformation->
Class[6]);
161 ok(FullInformation->
Class[7] == 0x5555,
"Class[7] = %u\n", FullInformation->
Class[7]);
162
164 InfoLength = 0x55555555;
171 ok(FullInformation->
Class[0] ==
L'M',
"Class[0] = %u\n", FullInformation->
Class[0]);
172 ok(FullInformation->
Class[1] ==
L'y',
"Class[1] = %u\n", FullInformation->
Class[1]);
173 ok(FullInformation->
Class[6] ==
L's',
"Class[6] = %u\n", FullInformation->
Class[6]);
174 ok(FullInformation->
Class[7] == 0x5555,
"Class[7] = %u\n", FullInformation->
Class[7]);
175
176 RtlFreeHeap(RtlGetProcessHeap(), 0, FullInformation);
177
180
184}
#define ok_ntstatus(status, expected)
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)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define OBJ_CASE_INSENSITIVE
#define RtlFillMemory(Dest, Length, Fill)
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define REG_OPTION_VOLATILE
NTSTATUS NTAPI NtDeleteKey(IN HANDLE KeyHandle)
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 NtQueryKey(IN HANDLE KeyHandle, IN KEY_INFORMATION_CLASS KeyInformationClass, OUT PVOID KeyInformation, IN ULONG Length, OUT PULONG ResultLength)
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
#define RTL_CONSTANT_STRING(s)
#define FIELD_OFFSET(t, f)