Set last error in GlobalUnlock.
This commit is contained in:
parent
03131aae91
commit
de25e6f07c
|
@ -1129,11 +1129,13 @@ BOOL WINAPI GlobalUnlock(
|
||||||
if((pintern->LockCount<GLOBAL_LOCK_MAX)&&(pintern->LockCount>0))
|
if((pintern->LockCount<GLOBAL_LOCK_MAX)&&(pintern->LockCount>0))
|
||||||
pintern->LockCount--;
|
pintern->LockCount--;
|
||||||
|
|
||||||
locked=(pintern->LockCount==0) ? FALSE : TRUE;
|
locked = (pintern->LockCount != 0);
|
||||||
|
if (!locked) SetLastError(NO_ERROR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WARN("invalid handle\n");
|
WARN("invalid handle\n");
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
locked=FALSE;
|
locked=FALSE;
|
||||||
}
|
}
|
||||||
/* HeapUnlock(GetProcessHeap()); */
|
/* HeapUnlock(GetProcessHeap()); */
|
||||||
|
|
Loading…
Reference in New Issue