Skip to content

Commit b882f99

Browse files
committed
better stub for RtlQueryHeapInformation (taken from wine)
svn path=/trunk/; revision=43742
1 parent eae6521 commit b882f99

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

reactos/lib/rtl/heap.c

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,8 +1952,30 @@ RtlQueryHeapInformation(HANDLE HeapHandle,
19521952
SIZE_T HeapInformationLength OPTIONAL,
19531953
PSIZE_T ReturnLength OPTIONAL)
19541954
{
1955-
UNIMPLEMENTED;
1956-
return 0;
1955+
HEAP *heapPtr;
1956+
1957+
heapPtr = HEAP_GetPtr(HeapHandle);
1958+
if (!heapPtr)
1959+
{
1960+
RtlSetLastWin32ErrorAndNtStatusFromNtStatus( STATUS_INVALID_HANDLE );
1961+
return FALSE;
1962+
}
1963+
1964+
UNIMPLEMENTED
1965+
1966+
switch (HeapInformationClass)
1967+
{
1968+
case HeapCompatibilityInformation:
1969+
if (ReturnLength) *ReturnLength = sizeof(ULONG);
1970+
1971+
if (HeapInformationLength < sizeof(ULONG))
1972+
return STATUS_BUFFER_TOO_SMALL;
1973+
1974+
*(ULONG *)HeapInformation = 0; /* standard heap */
1975+
return STATUS_SUCCESS;
1976+
default:
1977+
return STATUS_INVALID_INFO_CLASS;
1978+
}
19571979
}
19581980

19591981
DWORD

0 commit comments

Comments
 (0)