mirror of
https://github.com/reactos/reactos.git
synced 2024-09-02 16:48:36 +00:00
- Fix Global/LocalFlags returns. Now pass all kernel32 heap tests.
svn path=/trunk/; revision=41895
This commit is contained in:
parent
1e3850cd25
commit
471fee4cfa
|
@ -228,14 +228,7 @@ GlobalFlags(HGLOBAL hMem)
|
|||
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 @@ GlobalFlags(HGLOBAL hMem)
|
|||
/* Set the Win32 Flag */
|
||||
uFlags |= GMEM_DDESHARE;
|
||||
}
|
||||
|
||||
if (!HandleEntry->Object) uFlags |= GMEM_DISCARDED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -806,6 +801,7 @@ GlobalUnlock(HGLOBAL hMem)
|
|||
/* It's not, fail */
|
||||
BASE_TRACE_FAILURE();
|
||||
SetLastError(ERROR_INVALID_HANDLE);
|
||||
RetVal = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -203,17 +203,12 @@ LocalFlags(HLOCAL hMem)
|
|||
|
||||
/* Now check if it's discarded */
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue