Author: cwittich
Date: Sun Oct 25 17:20:00 2009
New Revision: 43742
URL:
http://svn.reactos.org/svn/reactos?rev=43742&view=rev
Log:
better stub for RtlQueryHeapInformation (taken from wine)
Modified:
trunk/reactos/lib/rtl/heap.c
Modified: trunk/reactos/lib/rtl/heap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/heap.c?rev=43742&a…
==============================================================================
--- trunk/reactos/lib/rtl/heap.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/heap.c [iso-8859-1] Sun Oct 25 17:20:00 2009
@@ -1952,8 +1952,30 @@
SIZE_T HeapInformationLength OPTIONAL,
PSIZE_T ReturnLength OPTIONAL)
{
- UNIMPLEMENTED;
- return 0;
+ HEAP *heapPtr;
+
+ heapPtr = HEAP_GetPtr(HeapHandle);
+ if (!heapPtr)
+ {
+ RtlSetLastWin32ErrorAndNtStatusFromNtStatus( STATUS_INVALID_HANDLE );
+ return FALSE;
+ }
+
+ UNIMPLEMENTED
+
+ switch (HeapInformationClass)
+ {
+ case HeapCompatibilityInformation:
+ if (ReturnLength) *ReturnLength = sizeof(ULONG);
+
+ if (HeapInformationLength < sizeof(ULONG))
+ return STATUS_BUFFER_TOO_SMALL;
+
+ *(ULONG *)HeapInformation = 0; /* standard heap */
+ return STATUS_SUCCESS;
+ default:
+ return STATUS_INVALID_INFO_CLASS;
+ }
}
DWORD