wine/dlls/ole32 defaulthandler.c

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 28 05:02:25 CST 2005


ChangeSet ID:	21465
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/28 05:02:25

Modified files:
	dlls/ole32     : defaulthandler.c 

Log message:
	Robert Shearman <rob at codeweavers.com>
	Call DefaultHandler_Stop if we fail to start the server running
	correctly and a few formatting fixes.

Patch: http://cvs.winehq.org/patch.py?id=21465

Old revision  New revision  Changes     Path
 1.36          1.37          +11 -5      wine/dlls/ole32/defaulthandler.c

Index: wine/dlls/ole32/defaulthandler.c
diff -u -p wine/dlls/ole32/defaulthandler.c:1.36 wine/dlls/ole32/defaulthandler.c:1.37
--- wine/dlls/ole32/defaulthandler.c:1.36	28 Nov 2005 11: 2:25 -0000
+++ wine/dlls/ole32/defaulthandler.c	28 Nov 2005 11: 2:25 -0000
@@ -1254,24 +1254,29 @@ static HRESULT WINAPI DefaultHandler_Run
   if (This->pOleDelegate)
     return S_OK;
 
-  hr = CoCreateInstance(&This->clsid, NULL, CLSCTX_LOCAL_SERVER, &IID_IOleObject, (void **)&This->pOleDelegate);
+  hr = CoCreateInstance(&This->clsid, NULL, CLSCTX_LOCAL_SERVER,
+                        &IID_IOleObject, (void **)&This->pOleDelegate);
   if (FAILED(hr))
     return hr;
 
-  hr = IOleObject_Advise(This->pOleDelegate, (IAdviseSink *)&This->lpvtblIAdviseSink, &This->dwAdvConn);
+  hr = IOleObject_Advise(This->pOleDelegate,
+                         (IAdviseSink *)&This->lpvtblIAdviseSink,
+                         &This->dwAdvConn);
 
   if (SUCCEEDED(hr) && This->clientSite)
     hr = IOleObject_SetClientSite(This->pOleDelegate, This->clientSite);
 
   if (SUCCEEDED(hr))
   {
-    IOleObject_QueryInterface(This->pOleDelegate, &IID_IPersistStorage, (void **)&This->pPSDelegate);
+    IOleObject_QueryInterface(This->pOleDelegate, &IID_IPersistStorage,
+                              (void **)&This->pPSDelegate);
     if (This->pPSDelegate)
       hr = IPersistStorage_InitNew(This->pPSDelegate, NULL);
   }
 
   if (SUCCEEDED(hr) && This->containerApp)
-    hr = IOleObject_SetHostNames(This->pOleDelegate, This->containerApp, This->containerObj);
+    hr = IOleObject_SetHostNames(This->pOleDelegate, This->containerApp,
+                                 This->containerObj);
 
   /* FIXME: do more stuff here:
    * - IOleObject_GetMiscStatus
@@ -1279,7 +1284,8 @@ static HRESULT WINAPI DefaultHandler_Run
    * - IOleCache_OnRun
    */
 
-  /* FIXME: if we failed, Close the object */
+  if (FAILED(hr))
+    DefaultHandler_Stop(This);
 
   return hr;
 }



More information about the wine-cvs mailing list