66{
75
76 OldSize = 0x100;
80 OldSize);
81 ok(
Buffer ==
NULL,
"RtlReAllocateHeap succeeded for NULL\n");
84
87 OldSize);
89 {
90 skip(
"RtlAllocateHeap failed for size %lu\n", OldSize);
91 return;
92 }
94
95 for (
Size = 0x78000;
Size < 0x90000 && Continue;
Size += 0x100)
96 {
98 }
99
100
101 for (
Size -= 0x100;
Size >= 0x78000 && Continue;
Size -= 0x100)
102 {
104 }
106
107
108 OldSize = 0x100;
111 OldSize);
113 {
114 skip(
"RtlAllocateHeap failed for size %lu\n", OldSize);
115 return;
116 }
117
119 UserFlags = 0x55555555;
121 0,
123 &UserValue,
124 &UserFlags);
126 ok(UserValue ==
NULL,
"UserValue = %p\n", UserValue);
128
130 0,
135
137 0,
139 &UserValue);
141
143 UserFlags = 0x55555555;
145 0,
147 &UserValue,
148 &UserFlags);
150 ok(UserValue == &UserValue,
"UserValue = %p, expected %p\n", UserValue, &UserValue);
152
153
157 OldSize / 2);
158 ok(Buffer2 ==
Buffer,
"New Buffer is %p, expected %p\n", Buffer2,
Buffer);
159 if (Buffer2)
Buffer = Buffer2;
161 UserFlags = 0x55555555;
163 0,
165 &UserValue,
166 &UserFlags);
168 ok(UserValue == &UserValue,
"UserValue = %p, expected %p\n", UserValue, &UserValue);
170
171
175 OldSize / 4 * 3);
176 ok(Buffer2 ==
Buffer,
"New Buffer is %p, expected %p\n", Buffer2,
Buffer);
177 if (Buffer2)
Buffer = Buffer2;
179 UserFlags = 0x55555555;
181 0,
183 &UserValue,
184 &UserFlags);
186 ok(UserValue == &UserValue,
"UserValue = %p, expected %p\n", UserValue, &UserValue);
188
190}
static BOOLEAN ReAllocBuffer(PUCHAR *Buffer, SIZE_T Size, SIZE_T *OldSizePtr, PCSTR Action)
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)
#define HEAP_SETTABLE_USER_FLAG2
#define HEAP_SETTABLE_USER_FLAG1
#define HEAP_SETTABLE_USER_FLAG3
#define HEAP_SETTABLE_USER_VALUE
#define HEAP_REALLOC_IN_PLACE_ONLY
BOOLEAN NTAPI RtlGetUserInfoHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID BaseAddress, OUT PVOID *UserValue, OUT PULONG UserFlags)
BOOLEAN NTAPI RtlSetUserFlagsHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID BaseAddress, IN ULONG UserFlagsReset, IN ULONG UserFlagsSet)
BOOLEAN NTAPI RtlSetUserValueHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID BaseAddress, IN PVOID UserValue)