- Global/LocalFlags, now checking the right bit for discared heap and not doing it the wine way.

svn path=/trunk/; revision=41896
This commit is contained in:
James Tabor 2009-07-11 22:52:36 +00:00
parent 471fee4cfa
commit a522461492
2 changed files with 10 additions and 4 deletions

View file

@ -224,7 +224,7 @@ GlobalFlags(HGLOBAL hMem)
/* Get the lock count first */ /* Get the lock count first */
uFlags = HandleEntry->LockCount & GMEM_LOCKCOUNT; uFlags = HandleEntry->LockCount & GMEM_LOCKCOUNT;
/* Now check if it's discarded */ /* Now check if it's discardable */
if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSABLE) if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSABLE)
{ {
/* Set the Win32 Flag */ /* Set the Win32 Flag */
@ -238,7 +238,10 @@ GlobalFlags(HGLOBAL hMem)
uFlags |= GMEM_DDESHARE; uFlags |= GMEM_DDESHARE;
} }
if (!HandleEntry->Object) uFlags |= GMEM_DISCARDED; /* Now check if it's discarded */
if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSE)
/* Set the Win32 Flag */
uFlags |= GMEM_DISCARDED;
} }
} }

View file

@ -201,14 +201,17 @@ LocalFlags(HLOCAL hMem)
/* Get the lock count first */ /* Get the lock count first */
uFlags = HandleEntry->LockCount & LMEM_LOCKCOUNT; uFlags = HandleEntry->LockCount & LMEM_LOCKCOUNT;
/* Now check if it's discarded */ /* Now check if it's discardable */
if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSABLE) if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSABLE)
{ {
/* Set the Win32 Flag */ /* Set the Win32 Flag */
uFlags |= LMEM_DISCARDABLE; uFlags |= LMEM_DISCARDABLE;
} }
if (!HandleEntry->Object) uFlags |= LMEM_DISCARDED; /* Now check if it's discarded */
if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSE)
/* Set the Win32 Flag */
uFlags |= LMEM_DISCARDED;
} }
} }