mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 21:48:19 +00:00
[SERVICES] Add basic support for setting lpServiceStartName via RChangeServiceConfigW().
This commit is contained in:
parent
a987856e71
commit
9d43950db7
1 changed files with 33 additions and 16 deletions
|
@ -2179,6 +2179,22 @@ RChangeServiceConfigW(
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Start name and password are only used by Win32 services */
|
||||||
|
if (lpService->Status.dwServiceType & SERVICE_WIN32)
|
||||||
|
{
|
||||||
|
/* Write service start name */
|
||||||
|
if (lpServiceStartName != NULL && *lpServiceStartName != 0)
|
||||||
|
{
|
||||||
|
dwError = RegSetValueExW(hServiceKey,
|
||||||
|
L"ObjectName",
|
||||||
|
0,
|
||||||
|
REG_SZ,
|
||||||
|
(LPBYTE)lpServiceStartName,
|
||||||
|
(DWORD)((wcslen(lpServiceStartName) + 1) * sizeof(WCHAR)));
|
||||||
|
if (dwError != ERROR_SUCCESS)
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
if (lpPassword != NULL)
|
if (lpPassword != NULL)
|
||||||
{
|
{
|
||||||
if (*(LPWSTR)lpPassword != 0)
|
if (*(LPWSTR)lpPassword != 0)
|
||||||
|
@ -2203,6 +2219,7 @@ RChangeServiceConfigW(
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (hServiceKey != NULL)
|
if (hServiceKey != NULL)
|
||||||
|
|
Loading…
Reference in a new issue