Author: ekohl
Date: Thu Jun 15 09:29:22 2017
New Revision: 75044
URL:
http://svn.reactos.org/svn/reactos?rev=75044&view=rev
Log:
[ADVAPI32]
OpenServiceA/W: Call SetLastError() in case of success too.
Modified:
trunk/reactos/dll/win32/advapi32/service/scm.c
Modified: trunk/reactos/dll/win32/advapi32/service/scm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Thu Jun 15 09:29:22 2017
@@ -1906,10 +1906,10 @@
}
RpcEndExcept;
+ SetLastError(dwError);
if (dwError != ERROR_SUCCESS)
{
TRACE("ROpenServiceA() failed (Error %lu)\n", dwError);
- SetLastError(dwError);
return NULL;
}
@@ -1955,10 +1955,10 @@
}
RpcEndExcept;
+ SetLastError(dwError);
if (dwError != ERROR_SUCCESS)
{
TRACE("ROpenServiceW() failed (Error %lu)\n", dwError);
- SetLastError(dwError);
return NULL;
}