Dmitry Timoshkov : ole32: Query support also for static storage formats.
Alexandre Julliard
julliard at winehq.org
Wed May 23 13:22:55 CDT 2012
Module: wine
Branch: master
Commit: 83aa7eff6cbcea3ed257d73f7c7503d35cce57a8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=83aa7eff6cbcea3ed257d73f7c7503d35cce57a8
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Wed May 23 16:50:12 2012 +0900
ole32: Query support also for static storage formats.
---
dlls/ole32/ole2impl.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/dlls/ole32/ole2impl.c b/dlls/ole32/ole2impl.c
index e4eccc1..79f2cb5 100644
--- a/dlls/ole32/ole2impl.c
+++ b/dlls/ole32/ole2impl.c
@@ -102,6 +102,8 @@ static inline void init_fmtetc(FORMATETC *fmt, CLIPFORMAT cf, TYMED tymed)
*/
static HRESULT get_storage(IDataObject *data, IStorage *stg, UINT *src_cf)
{
+ static const UINT fmt_id[] = { CF_METAFILEPICT, CF_BITMAP, CF_DIB };
+ UINT i;
HRESULT hr;
FORMATETC fmt;
STGMEDIUM med;
@@ -132,6 +134,17 @@ static HRESULT get_storage(IDataObject *data, IStorage *stg, UINT *src_cf)
return hr;
}
+ for (i = 0; i < sizeof(fmt_id)/sizeof(fmt_id[0]); i++)
+ {
+ init_fmtetc(&fmt, fmt_id[i], TYMED_ISTORAGE);
+ hr = IDataObject_QueryGetData(data, &fmt);
+ if(SUCCEEDED(hr))
+ {
+ *src_cf = fmt_id[i];
+ return hr;
+ }
+ }
+
/* IPersistStorage */
hr = IDataObject_QueryInterface(data, &IID_IPersistStorage, (void**)&persist);
if(FAILED(hr)) return hr;
More information about the wine-cvs
mailing list