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
a60f60ac
Commit
a60f60ac
authored
Apr 24, 2007
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
Apr 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Make service_start_process return the pid to the caller.
parent
e782b836
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
service.c
dlls/advapi32/service.c
+4
-3
No files found.
dlls/advapi32/service.c
View file @
a60f60ac
...
...
@@ -1436,7 +1436,7 @@ BOOL WINAPI StartServiceA( SC_HANDLE hService, DWORD dwNumServiceArgs,
/******************************************************************************
* service_start_process [INTERNAL]
*/
static
DWORD
service_start_process
(
struct
sc_service
*
hsvc
)
static
DWORD
service_start_process
(
struct
sc_service
*
hsvc
,
LPDWORD
ppid
)
{
static
const
WCHAR
_ImagePathW
[]
=
{
'I'
,
'm'
,
'a'
,
'g'
,
'e'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
PROCESS_INFORMATION
pi
;
...
...
@@ -1470,7 +1470,7 @@ static DWORD service_start_process(struct sc_service *hsvc)
r
=
CreateProcessW
(
NULL
,
path
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
);
if
(
r
)
{
/* FIXME: Put the pid into the service struct */
if
(
ppid
)
*
ppid
=
pi
.
dwProcessId
;
handles
[
1
]
=
pi
.
hProcess
;
ret
=
WaitForMultipleObjectsEx
(
2
,
handles
,
FALSE
,
30000
,
FALSE
);
...
...
@@ -1523,6 +1523,7 @@ BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs,
{
struct
sc_service
*
hsvc
;
BOOL
r
=
FALSE
;
DWORD
pid
;
SC_LOCK
hLock
;
HANDLE
handle
=
INVALID_HANDLE_VALUE
;
...
...
@@ -1543,7 +1544,7 @@ BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs,
if
(
handle
==
INVALID_HANDLE_VALUE
)
{
/* start the service process */
if
(
service_start_process
(
hsvc
))
if
(
service_start_process
(
hsvc
,
&
pid
))
handle
=
service_open_pipe
(
hsvc
->
name
);
}
...
...
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