Commit d2837d91 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

ole32: Add support for retrieving the data from CF_EMBEDDEDOBJECT.

parent 63eb8104
......@@ -98,7 +98,7 @@ static inline void init_fmtetc(FORMATETC *fmt, CLIPFORMAT cf, TYMED tymed)
*
* Retrieve an object's storage from a variety of sources.
*
* FIXME: CF_EMBEDDEDOBJECT, CF_FILENAME.
* FIXME: CF_FILENAME.
*/
static HRESULT get_storage(IDataObject *data, IStorage *stg, UINT *src_cf)
{
......@@ -110,6 +110,17 @@ static HRESULT get_storage(IDataObject *data, IStorage *stg, UINT *src_cf)
*src_cf = 0;
/* CF_EMBEDEDOBJECT */
init_fmtetc(&fmt, embedded_object_clipboard_format, TYMED_ISTORAGE);
med.tymed = TYMED_ISTORAGE;
med.u.pstg = stg;
hr = IDataObject_GetDataHere(data, &fmt, &med);
if(SUCCEEDED(hr))
{
*src_cf = embedded_object_clipboard_format;
return hr;
}
/* CF_EMBEDSOURCE */
init_fmtetc(&fmt, embed_source_clipboard_format, TYMED_ISTORAGE);
med.tymed = TYMED_ISTORAGE;
......
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