Commit 88219db8 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Handle SetClipboardData failing in OLE clipboard functions.

parent 36bfaea9
......@@ -1701,7 +1701,11 @@ static HRESULT set_clipboard_formats(ole_clipbrd *clipbrd, IDataObject *data)
td_offs_to_ptr(clipbrd->cached_enum, (DWORD_PTR)clipbrd->cached_enum->entries[idx].fmtetc.ptd);
GlobalUnlock(priv_data_handle);
SetClipboardData(ole_private_data_clipboard_format, priv_data_handle);
if(!SetClipboardData(ole_private_data_clipboard_format, priv_data_handle))
{
GlobalFree(priv_data_handle);
return CLIPBRD_E_CANT_SET;
}
return S_OK;
}
......@@ -1759,7 +1763,11 @@ static HRESULT expose_marshalled_dataobject(ole_clipbrd *clipbrd, IDataObject *d
if(!h) return E_OUTOFMEMORY;
SetClipboardData(wine_marshal_clipboard_format, h);
if(!SetClipboardData(wine_marshal_clipboard_format, h))
{
GlobalFree(h);
return CLIPBRD_E_CANT_SET;
}
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