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
cbc5de1c
Commit
cbc5de1c
authored
Aug 10, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Aug 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Fix handling of user defined service controls.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
31d8d198
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
rpc.c
programs/services/rpc.c
+3
-0
service.c
programs/services/tests/service.c
+7
-0
No files found.
programs/services/rpc.c
View file @
cbc5de1c
...
...
@@ -941,6 +941,9 @@ static BOOL service_accepts_control(const struct service_entry *service, DWORD d
{
DWORD
a
=
service
->
status
.
dwControlsAccepted
;
if
(
dwControl
>=
128
&&
dwControl
<=
255
)
return
TRUE
;
switch
(
dwControl
)
{
case
SERVICE_CONTROL_INTERROGATE
:
...
...
programs/services/tests/service.c
View file @
cbc5de1c
...
...
@@ -83,6 +83,9 @@ static DWORD WINAPI service_handler(DWORD ctrl, DWORD event_type, void *event_da
SetServiceStatus
(
service_handle
,
&
status
);
SetEvent
(
service_stop_event
);
return
NO_ERROR
;
case
128
:
service_event
(
"CUSTOM"
);
return
0xdeadbeef
;
default:
status
.
dwCurrentState
=
SERVICE_RUNNING
;
SetServiceStatus
(
service_handle
,
&
status
);
...
...
@@ -346,6 +349,10 @@ static void test_service(void)
ok
(
status
.
dwCheckPoint
==
0
,
"status.dwCheckPoint = %d
\n
"
,
status
.
dwCheckPoint
);
todo_wine
ok
(
status
.
dwWaitHint
==
0
,
"status.dwWaitHint = %d
\n
"
,
status
.
dwWaitHint
);
res
=
ControlService
(
service_handle
,
128
,
&
status
);
ok
(
res
,
"ControlService failed: %u
\n
"
,
GetLastError
());
expect_event
(
"CUSTOM"
);
res
=
ControlService
(
service_handle
,
SERVICE_CONTROL_STOP
,
&
status
);
ok
(
res
,
"ControlService failed: %u
\n
"
,
GetLastError
());
expect_event
(
"STOP"
);
...
...
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