mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
ole32: Handle SetClipboardData failing in OLE clipboard functions.
This commit is contained in:
parent
36bfaea96d
commit
88219db8ab
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user