Commit 8e32b5f8 authored by Damjan Jovanovic's avatar Damjan Jovanovic Committed by Alexandre Julliard

winex11.drv: Use the global memory functions to allocate the memory for STGMEDIUM's hGlobal.

parent a8499c08
......@@ -977,10 +977,11 @@ static HRESULT WINAPI XDNDDATAOBJECT_GetData(IDataObject *dataObject,
if (current->cf_win == formatEtc->cfFormat)
{
pMedium->tymed = TYMED_HGLOBAL;
pMedium->u.hGlobal = HeapAlloc(GetProcessHeap(), 0, current->size);
pMedium->u.hGlobal = GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT, current->size);
if (pMedium->u.hGlobal == NULL)
return E_OUTOFMEMORY;
memcpy(pMedium->u.hGlobal, current->data, current->size);
memcpy(GlobalLock(pMedium->u.hGlobal), current->data, current->size);
GlobalUnlock(pMedium->u.hGlobal);
pMedium->pUnkForRelease = 0;
return S_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment