Set last error in GlobalUnlock.

This commit is contained in:
Alexandre Julliard 2000-12-19 23:38:13 +00:00
parent 03131aae91
commit de25e6f07c
1 changed files with 3 additions and 1 deletions

View File

@ -1129,11 +1129,13 @@ BOOL WINAPI GlobalUnlock(
if((pintern->LockCount<GLOBAL_LOCK_MAX)&&(pintern->LockCount>0))
pintern->LockCount--;
locked=(pintern->LockCount==0) ? FALSE : TRUE;
locked = (pintern->LockCount != 0);
if (!locked) SetLastError(NO_ERROR);
}
else
{
WARN("invalid handle\n");
SetLastError(ERROR_INVALID_HANDLE);
locked=FALSE;
}
/* HeapUnlock(GetProcessHeap()); */