mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 18:56:48 +00:00
[ADVAPI32] OpenSCManagerA/W: Set the last error even in case of success
This fixes a failure in the QueryServiceConfig2 api test.
This commit is contained in:
parent
17864b49e3
commit
5d3fe05505
1 changed files with 2 additions and 2 deletions
|
@ -1989,10 +1989,10 @@ OpenSCManagerA(LPCSTR lpMachineName,
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
|
SetLastError(dwError);
|
||||||
if (dwError != ERROR_SUCCESS)
|
if (dwError != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
TRACE("ROpenSCManagerA() failed (Error %lu)\n", dwError);
|
TRACE("ROpenSCManagerA() failed (Error %lu)\n", dwError);
|
||||||
SetLastError(dwError);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2033,10 +2033,10 @@ OpenSCManagerW(LPCWSTR lpMachineName,
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
|
SetLastError(dwError);
|
||||||
if (dwError != ERROR_SUCCESS)
|
if (dwError != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
TRACE("ROpenSCManagerW() failed (Error %lu)\n", dwError);
|
TRACE("ROpenSCManagerW() failed (Error %lu)\n", dwError);
|
||||||
SetLastError(dwError);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue