Re: Alexander Scott-Johns : ole32: Add support for rendering METAFILEPICT clipboard objects.
On 1/28/2011 21:30, Alexandre Julliard wrote:
Module: wine Branch: master Commit: 0f4fbd30f6bf3d2ef471d3d75307c7fa8a7df137 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0f4fbd30f6bf3d2ef471d3d753...
Author: Alexander Scott-Johns<alexander.scott.johns(a)googlemail.com> Date: Tue Jan 25 15:09:21 2011 +0000
ole32: Add support for rendering METAFILEPICT clipboard objects.
---
dlls/ole32/clipboard.c | 97 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 96 insertions(+), 1 deletions(-)
+/*************************************************************************** + * get_data_from_metafilepict + */ +static HRESULT get_data_from_metafilepict(IDataObject *data, FORMATETC *fmt, HGLOBAL *mem) +{ + HGLOBAL copy; + HRESULT hr; + FORMATETC mem_fmt; + STGMEDIUM med; + + *mem = NULL; + + mem_fmt = *fmt; + mem_fmt.tymed = TYMED_MFPICT; + + hr = IDataObject_GetData(data,&mem_fmt,&med); + if(FAILED(hr)) return hr; + + hr = dup_metafilepict(med.u.hMetaFilePict,©); + if(FAILED(hr)) return hr; 'med' should be released here on failure. + + *mem = copy; + + ReleaseStgMedium(&med); + + return hr; +} + /***********************************************************************
participants (1)
-
Nikolay Sivov