mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
GlobalAlloc as GlobalAlloc16 should round size to 32.
Call SetLastError in GlobalLock.
This commit is contained in:
parent
394e0eb19b
commit
c34fe084d5
1 changed files with 2 additions and 0 deletions
|
@ -1049,6 +1049,7 @@ HGLOBAL WINAPI GlobalAlloc(
|
|||
if (!pintern) return NULL;
|
||||
if(size)
|
||||
{
|
||||
size = (size + 0x1f) & ~0x1f;
|
||||
if (!(palloc=HeapAlloc(heap, hpflags, size+sizeof(HGLOBAL)))) {
|
||||
HeapFree(heap, 0, pintern);
|
||||
return NULL;
|
||||
|
@ -1097,6 +1098,7 @@ LPVOID WINAPI GlobalLock(
|
|||
{
|
||||
WARN("invalid handle\n");
|
||||
palloc=(LPVOID) NULL;
|
||||
SetLastError(ERROR_INVALID_HANDLE);
|
||||
}
|
||||
/* HeapUnlock(GetProcessHeap()); */;
|
||||
return palloc;
|
||||
|
|
Loading…
Reference in a new issue