Commit 5c97db9d authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

ole32: Add support for retrieving enhanced metafiles.

parent d5d3efd5
......@@ -1133,6 +1133,22 @@ static HRESULT get_stgmed_for_storage(HGLOBAL h, STGMEDIUM *med)
return hr;
}
/************************************************************************
* get_stgmed_for_emf
*
* Returns a stg medium with an enhanced metafile based on the handle
*/
static HRESULT get_stgmed_for_emf(HENHMETAFILE hemf, STGMEDIUM *med)
{
med->pUnkForRelease = NULL;
med->tymed = TYMED_NULL;
med->u.hEnhMetaFile = CopyEnhMetaFileW(hemf, NULL);
if(!med->u.hEnhMetaFile) return E_OUTOFMEMORY;
med->tymed = TYMED_ENHMF;
return S_OK;
}
static inline BOOL string_off_equal(const DVTARGETDEVICE *t1, WORD off1, const DVTARGETDEVICE *t2, WORD off2)
{
const WCHAR *str1, *str2;
......@@ -1222,6 +1238,8 @@ static HRESULT WINAPI snapshot_GetData(IDataObject *iface, FORMATETC *fmt,
hr = get_stgmed_for_global(h, med);
else if(mask & TYMED_ISTREAM)
hr = get_stgmed_for_stream(h, med);
else if(mask & TYMED_ENHMF)
hr = get_stgmed_for_emf((HENHMETAFILE)h, med);
else
{
FIXME("Unhandled tymed - mask %x req tymed %x\n", mask, fmt->tymed);
......
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