Author: jimtabor
Date: Sun Jul 12 02:14:19 2009
New Revision: 41895
URL:
http://svn.reactos.org/svn/reactos?rev=41895&view=rev
Log:
- Fix Global/LocalFlags returns. Now pass all kernel32 heap tests.
Modified:
trunk/reactos/dll/win32/kernel32/mem/global.c
trunk/reactos/dll/win32/kernel32/mem/local.c
Modified: trunk/reactos/dll/win32/kernel32/mem/global.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/mem/glo…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/mem/global.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/mem/global.c [iso-8859-1] Sun Jul 12 02:14:19 2009
@@ -228,14 +228,7 @@
if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSABLE)
{
/* Set the Win32 Flag */
- uFlags |= GMEM_DISCARDED;
- }
-
- /* Check if it's movable */
- if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_MOVABLE)
- {
- /* Set the Win32 Flag */
- uFlags |= GMEM_MOVEABLE;
+ uFlags |= GMEM_DISCARDABLE;
}
/* Check if it's DDE Shared */
@@ -244,6 +237,8 @@
/* Set the Win32 Flag */
uFlags |= GMEM_DDESHARE;
}
+
+ if (!HandleEntry->Object) uFlags |= GMEM_DISCARDED;
}
}
@@ -806,6 +801,7 @@
/* It's not, fail */
BASE_TRACE_FAILURE();
SetLastError(ERROR_INVALID_HANDLE);
+ RetVal = FALSE;
}
else
{
Modified: trunk/reactos/dll/win32/kernel32/mem/local.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/mem/loc…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/mem/local.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/mem/local.c [iso-8859-1] Sun Jul 12 02:14:19 2009
@@ -205,15 +205,10 @@
if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSABLE)
{
/* Set the Win32 Flag */
- uFlags |= LMEM_DISCARDED;
- }
-
- /* Check if it's movable */
- if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_MOVABLE)
- {
- /* Set the Win32 Flag */
uFlags |= LMEM_DISCARDABLE;
}
+
+ if (!HandleEntry->Object) uFlags |= LMEM_DISCARDED;
}
}