Re: [PATCH v2 1/3] comdlg32: Init clipboard format only once in filedlg.
Lauri Kenttä <lauri.kentta(a)gmail.com> writes:
@@ -3798,6 +3789,25 @@ static void COMCTL32_ReleaseStgMedium (STGMEDIUM medium) }
/*********************************************************************** + * GetFormatEtc + * + * Get the FORMATETC used in the shell id list + */ +static FORMATETC* GetFormatEtc(void) +{ + static FORMATETC formatetc; + if (!formatetc.cfFormat) + { + formatetc.cfFormat = RegisterClipboardFormatA(CFSTR_SHELLIDLISTA); + formatetc.ptd = 0; + formatetc.dwAspect = DVASPECT_CONTENT; + formatetc.lindex = -1; + formatetc.tymed = TYMED_HGLOBAL; + } + return &formatetc; +}
This looks a little risky, since the structure is passed to the application. Caching only the clipboard format should be enough. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard