ole32: Handle SetClipboardData failing in OLE clipboard functions.

This commit is contained in:
Rob Shearman 2009-12-29 19:00:53 +00:00 committed by Alexandre Julliard
parent 36bfaea96d
commit 88219db8ab

View File

@ -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;
}