diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 0d134426c4e..c95fcd9f26c 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -339,85 +339,6 @@ void __RPC_USER MACHINE_HANDLEW_unbind(MACHINE_HANDLEW MachineName, handle_t h) RpcBindingFree(&h); } -/****************************************************************************** - * registry access functions and data - */ -static const WCHAR szDisplayName[] = { - 'D','i','s','p','l','a','y','N','a','m','e', 0 }; -static const WCHAR szType[] = {'T','y','p','e',0}; -static const WCHAR szStart[] = {'S','t','a','r','t',0}; -static const WCHAR szError[] = { - 'E','r','r','o','r','C','o','n','t','r','o','l', 0}; -static const WCHAR szImagePath[] = {'I','m','a','g','e','P','a','t','h',0}; -static const WCHAR szGroup[] = {'G','r','o','u','p',0}; -static const WCHAR szDependencies[] = { - 'D','e','p','e','n','d','e','n','c','i','e','s',0}; -static const WCHAR szDependOnService[] = { - 'D','e','p','e','n','d','O','n','S','e','r','v','i','c','e',0}; -static const WCHAR szObjectName[] = { - 'O','b','j','e','c','t','N','a','m','e',0}; -static const WCHAR szTag[] = { - 'T','a','g',0}; - -struct reg_value { - DWORD type; - DWORD size; - LPCWSTR name; - LPCVOID data; -}; - -static inline void service_set_value( struct reg_value *val, - DWORD type, LPCWSTR name, LPCVOID data, DWORD size ) -{ - val->name = name; - val->type = type; - val->data = data; - val->size = size; -} - -static inline void service_set_dword( struct reg_value *val, - LPCWSTR name, const DWORD *data ) -{ - service_set_value( val, REG_DWORD, name, data, sizeof (DWORD)); -} - -static inline void service_set_string( struct reg_value *val, - LPCWSTR name, LPCWSTR string ) -{ - DWORD len = (lstrlenW(string)+1) * sizeof (WCHAR); - service_set_value( val, REG_SZ, name, string, len ); -} - -static inline void service_set_multi_string( struct reg_value *val, - LPCWSTR name, LPCWSTR string ) -{ - DWORD len = 0; - - /* determine the length of a double null terminated multi string */ - do { - len += (lstrlenW( &string[ len ] )+1); - } while ( string[ len++ ] ); - - len *= sizeof (WCHAR); - service_set_value( val, REG_MULTI_SZ, name, string, len ); -} - -static inline LONG service_write_values( HKEY hKey, - const struct reg_value *val, int n ) -{ - LONG r = ERROR_SUCCESS; - int i; - - for( i=0; i