Peter Dons Tychsen : services: Fixed problem with services where DependOnServices key is REG_SZ and not REG_MULTI_SZ .
Alexandre Julliard
julliard at winehq.org
Wed Sep 17 07:15:13 CDT 2008
Module: wine
Branch: master
Commit: 741dd708c432823ceb4343a7867fd784ce3212e8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=741dd708c432823ceb4343a7867fd784ce3212e8
Author: Peter Dons Tychsen <donpedro at tdcadsl.dk>
Date: Wed Sep 17 00:35:01 2008 +0200
services: Fixed problem with services where DependOnServices key is REG_SZ and not REG_MULTI_SZ.
---
programs/services/services.c | 4 ++--
programs/services/services.h | 2 +-
programs/services/utils.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/programs/services/services.c b/programs/services/services.c
index 36ed117..cd71a1f 100644
--- a/programs/services/services.c
+++ b/programs/services/services.c
@@ -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)
diff --git a/programs/services/services.h b/programs/services/services.h
index fd99bf9..cd7de02 100644
--- a/programs/services/services.h
+++ b/programs/services/services.h
@@ -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)
diff --git a/programs/services/utils.c b/programs/services/utils.c
index 89eb500..191cc5f 100644
--- a/programs/services/utils.c
+++ b/programs/services/utils.c
@@ -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;
More information about the wine-cvs
mailing list