Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
eae2cf56
Commit
eae2cf56
authored
Oct 22, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Save service dependencies.
parent
c125fc15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
services.c
programs/services/services.c
+23
-0
No files found.
programs/services/services.c
View file @
eae2cf56
...
...
@@ -154,6 +154,25 @@ static DWORD reg_set_string_value(HKEY hKey, LPCWSTR value_name, LPCWSTR string)
return
RegSetValueExW
(
hKey
,
value_name
,
0
,
REG_SZ
,
(
const
BYTE
*
)
string
,
sizeof
(
WCHAR
)
*
(
strlenW
(
string
)
+
1
));
}
static
DWORD
reg_set_multisz_value
(
HKEY
hKey
,
LPCWSTR
value_name
,
LPCWSTR
string
)
{
const
WCHAR
*
ptr
;
if
(
!
string
)
{
DWORD
err
;
err
=
RegDeleteValueW
(
hKey
,
value_name
);
if
(
err
!=
ERROR_FILE_NOT_FOUND
)
return
err
;
return
ERROR_SUCCESS
;
}
ptr
=
string
;
while
(
*
ptr
)
ptr
+=
strlenW
(
ptr
)
+
1
;
return
RegSetValueExW
(
hKey
,
value_name
,
0
,
REG_MULTI_SZ
,
(
const
BYTE
*
)
string
,
sizeof
(
WCHAR
)
*
(
ptr
-
string
+
1
));
}
DWORD
save_service_config
(
struct
service_entry
*
entry
)
{
DWORD
err
;
...
...
@@ -173,6 +192,10 @@ DWORD save_service_config(struct service_entry *entry)
goto
cleanup
;
if
((
err
=
reg_set_string_value
(
hKey
,
SZ_DESCRIPTION
,
entry
->
description
))
!=
0
)
goto
cleanup
;
if
((
err
=
reg_set_multisz_value
(
hKey
,
SZ_DEPEND_ON_SERVICE
,
entry
->
dependOnServices
))
!=
0
)
goto
cleanup
;
if
((
err
=
reg_set_multisz_value
(
hKey
,
SZ_DEPEND_ON_GROUP
,
entry
->
dependOnGroups
))
!=
0
)
goto
cleanup
;
if
((
err
=
RegSetValueExW
(
hKey
,
SZ_START
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
entry
->
config
.
dwStartType
,
sizeof
(
DWORD
)))
!=
0
)
goto
cleanup
;
if
((
err
=
RegSetValueExW
(
hKey
,
SZ_ERROR
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
entry
->
config
.
dwErrorControl
,
sizeof
(
DWORD
)))
!=
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment