Author: ekohl
Date: Thu Jun 15 21:40:12 2017
New Revision: 75052
URL:
http://svn.reactos.org/svn/reactos?rev=75052&view=rev
Log:
[ADVAPI32]
CreateServiceA/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 21:40:12 2017
@@ -654,10 +654,10 @@
if (lpPasswordW != NULL)
HeapFree(GetProcessHeap(), 0, lpPasswordW);
+ SetLastError(dwError);
if (dwError != ERROR_SUCCESS)
{
TRACE("RCreateServiceA() failed (Error %lu)\n", dwError);
- SetLastError(dwError);
return NULL;
}
@@ -750,10 +750,10 @@
}
RpcEndExcept;
+ SetLastError(dwError);
if (dwError != ERROR_SUCCESS)
{
TRACE("RCreateServiceW() failed (Error %lu)\n", dwError);
- SetLastError(dwError);
return NULL;
}