Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
463f91dc
Commit
463f91dc
authored
Apr 15, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svchost: Simplify error handling, fix trace message.
parent
7e874aed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
svchost.c
programs/svchost/svchost.c
+8
-14
No files found.
programs/svchost/svchost.c
View file @
463f91dc
...
...
@@ -254,6 +254,7 @@ static BOOL StartGroupServices(LPWSTR services)
LPWSTR
service_name
=
NULL
;
SERVICE_TABLE_ENTRYW
*
service_table
=
NULL
;
DWORD
service_count
;
BOOL
ret
;
/* Count the services to load */
service_count
=
0
;
...
...
@@ -264,8 +265,7 @@ static BOOL StartGroupServices(LPWSTR services)
service_name
=
service_name
+
lstrlenW
(
service_name
);
++
service_name
;
}
WINE_TRACE
(
"Service group %s contains %d services
\n
"
,
wine_dbgstr_w
(
services
),
service_count
);
WINE_TRACE
(
"Service group contains %d services
\n
"
,
service_count
);
/* Populate the service table */
service_table
=
HeapAlloc
(
GetProcessHeap
(),
0
,
...
...
@@ -287,15 +287,12 @@ static BOOL StartGroupServices(LPWSTR services)
service_table
[
service_count
].
lpServiceProc
=
NULL
;
/* Start the services */
if
(
!
StartServiceCtrlDispatcherW
(
service_table
))
{
if
(
!
(
ret
=
StartServiceCtrlDispatcherW
(
service_table
)))
WINE_ERR
(
"StartServiceCtrlDispatcherW failed to start %s: %u
\n
"
,
wine_dbgstr_w
(
services
),
GetLastError
());
HeapFree
(
GetProcessHeap
(),
0
,
service_table
);
return
FALSE
;
}
HeapFree
(
GetProcessHeap
(),
0
,
service_table
);
return
TRUE
;
return
ret
;
}
/* Find the list of services associated with a group name and start those
...
...
@@ -327,14 +324,11 @@ static BOOL LoadGroup(PWCHAR group_name)
}
/* Start services */
if
(
StartGroupServices
(
services
)
==
FALSE
)
{
if
(
!
(
ret
=
StartGroupServices
(
services
)))
WINE_TRACE
(
"Failed to start service group
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
services
);
return
FALSE
;
}
HeapFree
(
GetProcessHeap
(),
0
,
services
);
return
TRUE
;
return
ret
;
}
/* Load svchost group specified on the command line via the /k option */
...
...
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