Robert Shearman : ole: Return the last error if we couldn't open the requested service.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jan 10 14:14:12 CST 2006


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

Author: Robert Shearman <rob at codeweavers.com>
Date:   Tue Jan 10 20:06:03 2006 +0100

ole: Return the last error if we couldn't open the requested service.

Fix the ok/failed message.

---

 dlls/ole32/rpc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c
index ba8ad10..c1b3f78 100644
--- a/dlls/ole32/rpc.c
+++ b/dlls/ole32/rpc.c
@@ -698,9 +698,11 @@ static DWORD start_local_service(LPCWSTR
             r = ERROR_SUCCESS;
         CloseServiceHandle(hsvc);
     }
+    else
+        r = GetLastError();
     CloseServiceHandle(handle);
 
-    TRACE("StartService returned error %ld (%s)\n", r, r?"ok":"failed");
+    TRACE("StartService returned error %ld (%s)\n", r, (r == ERROR_SUCCESS) ? "ok":"failed");
 
     return r;
 }




More information about the wine-cvs mailing list