Fix CreateService's error code for a service that already exists.
This commit is contained in:
parent
fb9d11941f
commit
816f86560e
|
@ -1024,7 +1024,10 @@ CreateServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
|
||||||
init_service_handle( retval, hscm, hKey, lpServiceName );
|
init_service_handle( retval, hscm, hKey, lpServiceName );
|
||||||
|
|
||||||
if (dp != REG_CREATED_NEW_KEY)
|
if (dp != REG_CREATED_NEW_KEY)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_SERVICE_EXISTS);
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
if(lpDisplayName)
|
if(lpDisplayName)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue