Huw Davies : ole32: Add support for retrieving the data from CF_EMBEDDEDOBJECT.

Alexandre Julliard julliard at winehq.org
Tue May 19 09:23:10 CDT 2009


Module: wine
Branch: master
Commit: d2837d91d0670e3d79e10620911e7f661d0d3d8a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d2837d91d0670e3d79e10620911e7f661d0d3d8a

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue May 19 12:08:18 2009 +0100

ole32: Add support for retrieving the data from CF_EMBEDDEDOBJECT.

---

 dlls/ole32/ole2impl.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/dlls/ole32/ole2impl.c b/dlls/ole32/ole2impl.c
index b37ced6..e226687 100644
--- a/dlls/ole32/ole2impl.c
+++ b/dlls/ole32/ole2impl.c
@@ -98,7 +98,7 @@ static inline void init_fmtetc(FORMATETC *fmt, CLIPFORMAT cf, TYMED tymed)
  *
  * Retrieve an object's storage from a variety of sources.
  *
- * FIXME: CF_EMBEDDEDOBJECT, CF_FILENAME.
+ * FIXME: CF_FILENAME.
  */
 static HRESULT get_storage(IDataObject *data, IStorage *stg, UINT *src_cf)
 {
@@ -110,6 +110,17 @@ static HRESULT get_storage(IDataObject *data, IStorage *stg, UINT *src_cf)
 
     *src_cf = 0;
 
+    /* CF_EMBEDEDOBJECT */
+    init_fmtetc(&fmt, embedded_object_clipboard_format, TYMED_ISTORAGE);
+    med.tymed = TYMED_ISTORAGE;
+    med.u.pstg = stg;
+    hr = IDataObject_GetDataHere(data, &fmt, &med);
+    if(SUCCEEDED(hr))
+    {
+        *src_cf = embedded_object_clipboard_format;
+        return hr;
+    }
+
     /* CF_EMBEDSOURCE */
     init_fmtetc(&fmt, embed_source_clipboard_format, TYMED_ISTORAGE);
     med.tymed = TYMED_ISTORAGE;




More information about the wine-cvs mailing list