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
52363aef
Commit
52363aef
authored
Jun 15, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Pass service name as argv[0] to ServiceMain.
parent
d0244d76
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
service.c
dlls/advapi32/service.c
+1
-2
services.c
programs/services/services.c
+1
-4
service.c
programs/services/tests/service.c
+4
-0
No files found.
dlls/advapi32/service.c
View file @
52363aef
...
...
@@ -430,8 +430,7 @@ static DWORD WINAPI service_control_dispatcher(LPVOID arg)
!
(
service
->
full_access_handle
=
OpenServiceW
(
manager
,
data
,
GENERIC_READ
|
GENERIC_WRITE
)))
FIXME
(
"failed to open service %s
\n
"
,
debugstr_w
(
data
)
);
}
result
=
service_handle_start
(
service
,
data
+
info
.
name_size
,
data_size
/
sizeof
(
WCHAR
)
-
info
.
name_size
);
result
=
service_handle_start
(
service
,
data
,
data_size
/
sizeof
(
WCHAR
));
break
;
case
WINESERV_SENDCONTROL
:
result
=
service_handle_control
(
service
,
info
.
control
);
...
...
programs/services/services.c
View file @
52363aef
...
...
@@ -299,11 +299,8 @@ static void scmdatabase_autostart_services(struct scmdatabase *db)
for
(
i
=
0
;
i
<
size
;
i
++
)
{
DWORD
err
;
const
WCHAR
*
argv
[
2
];
service
=
services_list
[
i
];
argv
[
0
]
=
service
->
name
;
argv
[
1
]
=
NULL
;
err
=
service_start
(
service
,
1
,
argv
);
err
=
service_start
(
service
,
0
,
NULL
);
if
(
err
!=
ERROR_SUCCESS
)
WINE_FIXME
(
"Auto-start service %s failed to start: %d
\n
"
,
wine_dbgstr_w
(
service
->
name
),
err
);
...
...
programs/services/tests/service.c
View file @
52363aef
...
...
@@ -94,6 +94,10 @@ static void WINAPI service_main(DWORD argc, char **argv)
SERVICE_STATUS
status
;
BOOL
res
;
service_ok
(
argc
==
1
,
"argc = %d"
,
argc
);
if
(
argc
)
service_ok
(
!
strcmp
(
argv
[
0
],
service_name
),
"argv[0] = %s, expected %s"
,
argv
[
0
],
service_name
);
service_handle
=
pRegisterServiceCtrlHandlerExA
(
service_name
,
service_handler
,
NULL
);
service_ok
(
service_handle
!=
NULL
,
"RegisterServiceCtrlHandlerEx failed: %u
\n
"
,
GetLastError
());
if
(
!
service_handle
)
...
...
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