Skip to content
Snippets Groups Projects
Commit c34fe084 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard
Browse files

GlobalAlloc as GlobalAlloc16 should round size to 32.

Call SetLastError in GlobalLock.
parent 394e0eb1
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment