Commit 741dd708 authored by Peter Dons Tychsen's avatar Peter Dons Tychsen Committed by Alexandre Julliard

services: Fixed problem with services where DependOnServices key is REG_SZ and not REG_MULTI_SZ.

parent 62823d27
......@@ -106,9 +106,9 @@ static DWORD load_service_config(HKEY hKey, struct service_entry *entry)
return err;
if ((err = load_reg_string(hKey, SZ_DESCRIPTION, 0, &entry->description)) != 0)
return err;
if ((err = load_reg_multisz(hKey, SZ_DEPEND_ON_SERVICE, &entry->dependOnServices)) != 0)
if ((err = load_reg_multisz(hKey, SZ_DEPEND_ON_SERVICE, TRUE, &entry->dependOnServices)) != 0)
return err;
if ((err = load_reg_multisz(hKey, SZ_DEPEND_ON_GROUP, &entry->dependOnGroups)) != 0)
if ((err = load_reg_multisz(hKey, SZ_DEPEND_ON_GROUP, FALSE, &entry->dependOnGroups)) != 0)
return err;
if ((err = load_reg_dword(hKey, SZ_TYPE, &entry->config.dwServiceType)) != 0)
......
......@@ -87,7 +87,7 @@ LPWSTR strdupW(LPCWSTR str);
BOOL check_multisz(LPCWSTR lpMultiSz, DWORD cbSize);
DWORD load_reg_string(HKEY hKey, LPCWSTR szValue, BOOL bExpand, LPWSTR *output);
DWORD load_reg_multisz(HKEY hKey, LPCWSTR szValue, LPWSTR *output);
DWORD load_reg_multisz(HKEY hKey, LPCWSTR szValue, BOOL bAllowSingle, LPWSTR *output);
DWORD load_reg_dword(HKEY hKey, LPCWSTR szValue, DWORD *output);
static inline LPCWSTR get_display_name(struct service_entry *service)
......
......@@ -102,7 +102,7 @@ failed:
return err;
}
DWORD load_reg_multisz(HKEY hKey, LPCWSTR szValue, LPWSTR *output)
DWORD load_reg_multisz(HKEY hKey, LPCWSTR szValue, BOOL bAllowSingle, LPWSTR *output)
{
DWORD size, type;
LPWSTR buf = NULL;
......@@ -118,7 +118,7 @@ DWORD load_reg_multisz(HKEY hKey, LPCWSTR szValue, LPWSTR *output)
}
goto failed;
}
if (type != REG_MULTI_SZ)
if (!((type == REG_MULTI_SZ) || ((type == REG_SZ) && bAllowSingle)))
{
err = ERROR_INVALID_DATATYPE;
goto failed;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment