mirror of
https://github.com/reactos/reactos.git
synced 2026-06-03 09:51:03 +08: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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user