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

Fix the ok/failed message.
This commit is contained in:
Robert Shearman 2006-01-10 20:06:03 +01:00 committed by Alexandre Julliard
parent 4e31bf6863
commit c46386ff5c
1 changed files with 3 additions and 1 deletions

View File

@ -698,9 +698,11 @@ static DWORD start_local_service(LPCWSTR name, DWORD num, LPWSTR *params)
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;
}