[1/2] ole32: Accept TYMED_FILE as a possible source of CF_METAFILEPICT format.

Huw Davies huw at codeweavers.com
Thu Oct 29 04:18:21 CDT 2015


B1;2cOn Fri, Oct 23, 2015 at 06:32:17PM +0800, Dmitry Timoshkov wrote:
> diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
> index caabd10..3db0edf 100644
> --- a/dlls/ole32/datacache.c
> +++ b/dlls/ole32/datacache.c
> @@ -285,7 +285,7 @@ static DataCacheEntry *DataCache_GetEntryForFormatEtc(DataCache *This, const FOR
>  static HRESULT check_valid_clipformat_and_tymed(CLIPFORMAT cfFormat, DWORD tymed)
>  {
>      if (!cfFormat || !tymed ||
> -        (cfFormat == CF_METAFILEPICT && tymed == TYMED_MFPICT) ||
> +        (cfFormat == CF_METAFILEPICT && (tymed == TYMED_MFPICT || tymed == TYMED_FILE)) ||
>          (cfFormat == CF_BITMAP && tymed == TYMED_GDI) ||
>          (cfFormat == CF_DIB && tymed == TYMED_HGLOBAL) ||
>          (cfFormat == CF_ENHMETAFILE && tymed == TYMED_ENHMF))

This should be easy enough to test.  Create a stand-alone data cache
( using CreateDataCache() ), then call IOleCache_Cache with the
relevant fmtetc.

Huw.



More information about the wine-devel mailing list