Robert Shearman : ole32: Do a QueryInterface for IOleLink in OleLoad, like native does.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Sep 7 05:07:18 CDT 2006


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

Author: Robert Shearman <rob at codeweavers.com>
Date:   Thu Aug 31 17:18:36 2006 +0100

ole32: Do a QueryInterface for IOleLink in OleLoad, like native does.

---

 dlls/ole32/ole2.c |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c
index 8f0629c..c6df7ed 100644
--- a/dlls/ole32/ole2.c
+++ b/dlls/ole32/ole2.c
@@ -1007,12 +1007,13 @@ HRESULT WINAPI OleLoad(
     }
   }
 
-  /*
-   * Initialize the object with it's IPersistStorage interface.
-   */
-  hres = IOleObject_QueryInterface(pUnk,
-				   &IID_IPersistStorage,
-				   (void**)&persistStorage);
+  if (SUCCEEDED(hres))
+    /*
+     * Initialize the object with it's IPersistStorage interface.
+     */
+    hres = IOleObject_QueryInterface(pUnk,
+				     &IID_IPersistStorage,
+				     (void**)&persistStorage);
 
   if (SUCCEEDED(hres))
   {
@@ -1034,6 +1035,18 @@ HRESULT WINAPI OleLoad(
   if (pOleObject)
     IOleObject_Release(pOleObject);
 
+  if (SUCCEEDED(hres))
+  {
+    IOleLink *pOleLink;
+    HRESULT hres1;
+    hres1 = IUnknown_QueryInterface(pUnk, &IID_IOleLink, (void **)&pOleLink);
+    if (SUCCEEDED(hres1))
+    {
+      FIXME("handle OLE link\n");
+      IOleLink_Release(pOleLink);
+    }
+  }
+
   if (FAILED(hres))
   {
     IUnknown_Release(pUnk);




More information about the wine-cvs mailing list