[WIN32K:NTUSER]

- Make IntRemoveProp return the property value and use it from NtUserRemoveProp

svn path=/trunk/; revision=69488
This commit is contained in:
Thomas Faber 2015-10-10 14:43:25 +00:00
parent 7e1a5245cd
commit 4c064550ec
2 changed files with 7 additions and 16 deletions

View file

@ -58,25 +58,27 @@ UserGetProp(
} }
_Success_(return) _Success_(return)
BOOL HANDLE
FASTCALL FASTCALL
IntRemoveProp( IntRemoveProp(
_In_ PWND Window, _In_ PWND Window,
_In_ ATOM Atom) _In_ ATOM Atom)
{ {
PPROPERTY Prop; PPROPERTY Prop;
HANDLE Data;
NT_ASSERT(UserIsEnteredExclusive()); NT_ASSERT(UserIsEnteredExclusive());
Prop = IntGetProp(Window, Atom); Prop = IntGetProp(Window, Atom);
if (Prop == NULL) if (Prop == NULL)
{ {
return FALSE; return NULL;
} }
Data = Prop->Data;
RemoveEntryList(&Prop->PropListEntry); RemoveEntryList(&Prop->PropListEntry);
UserHeapFree(Prop); UserHeapFree(Prop);
Window->PropListItems--; Window->PropListItems--;
return TRUE; return Data;
} }
_Success_(return) _Success_(return)
@ -215,7 +217,6 @@ NtUserRemoveProp(
_In_ ATOM Atom) _In_ ATOM Atom)
{ {
PWND Window; PWND Window;
PPROPERTY Prop;
HANDLE Data = NULL; HANDLE Data = NULL;
TRACE("Enter NtUserRemoveProp\n"); TRACE("Enter NtUserRemoveProp\n");
@ -227,16 +228,7 @@ NtUserRemoveProp(
goto Exit; goto Exit;
} }
Prop = IntGetProp(Window, Atom); Data = IntRemoveProp(Window, Atom);
if (Prop == NULL)
{
goto Exit;
}
Data = Prop->Data;
RemoveEntryList(&Prop->PropListEntry);
UserHeapFree(Prop);
Window->PropListItems--;
Exit: Exit:
TRACE("Leave NtUserRemoveProp, ret=%p\n", Data); TRACE("Leave NtUserRemoveProp, ret=%p\n", Data);

View file

@ -12,8 +12,7 @@ UserGetProp(
_In_ PWND Window, _In_ PWND Window,
_In_ ATOM Atom); _In_ ATOM Atom);
_Success_(return) HANDLE
BOOL
FASTCALL FASTCALL
IntRemoveProp( IntRemoveProp(
_In_ PWND Window, _In_ PWND Window,