Return the correct error when OpenService is called with a
non-existing service.
This commit is contained in:
parent
2fbed28b43
commit
8100e0eec2
|
@ -533,6 +533,7 @@ SC_HANDLE WINAPI OpenServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
|
||||||
if (r!=ERROR_SUCCESS)
|
if (r!=ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
free_sc_handle( retval );
|
free_sc_handle( retval );
|
||||||
|
SetLastError( ERROR_SERVICE_DOES_NOT_EXIST );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue