mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 18:31:26 +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;
|
||||
|
||||
SetLastError(dwError);
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
{
|
||||
TRACE("ROpenSCManagerA() failed (Error %lu)\n", dwError);
|
||||
SetLastError(dwError);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -2033,10 +2033,10 @@ OpenSCManagerW(LPCWSTR lpMachineName,
|
|||
}
|
||||
RpcEndExcept;
|
||||
|
||||
SetLastError(dwError);
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
{
|
||||
TRACE("ROpenSCManagerW() failed (Error %lu)\n", dwError);
|
||||
SetLastError(dwError);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue