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
038c3a26
Commit
038c3a26
authored
Jan 09, 2008
by
Paul Chitescu
Committed by
Alexandre Julliard
Jan 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Accept a NULL lpServiceStatus in ControlService.
parent
95fa37ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
service.c
dlls/advapi32/service.c
+21
-18
No files found.
dlls/advapi32/service.c
View file @
038c3a26
...
...
@@ -1037,26 +1037,29 @@ BOOL WINAPI ControlService( SC_HANDLE hService, DWORD dwControl,
return
FALSE
;
}
ret
=
QueryServiceStatus
(
hService
,
lpServiceStatus
);
if
(
!
ret
)
if
(
lpServiceStatus
)
{
ERR
(
"failed to query service status
\n
"
);
SetLastError
(
ERROR_SERVICE_NOT_ACTIVE
);
return
FALSE
;
}
ret
=
QueryServiceStatus
(
hService
,
lpServiceStatus
);
if
(
!
ret
)
{
ERR
(
"failed to query service status
\n
"
);
SetLastError
(
ERROR_SERVICE_NOT_ACTIVE
);
return
FALSE
;
}
switch
(
lpServiceStatus
->
dwCurrentState
)
{
case
SERVICE_STOPPED
:
SetLastError
(
ERROR_SERVICE_NOT_ACTIVE
);
return
FALSE
;
case
SERVICE_START_PENDING
:
if
(
dwControl
==
SERVICE_CONTROL_STOP
)
break
;
/* fall thru */
case
SERVICE_STOP_PENDING
:
SetLastError
(
ERROR_SERVICE_CANNOT_ACCEPT_CTRL
);
return
FALSE
;
switch
(
lpServiceStatus
->
dwCurrentState
)
{
case
SERVICE_STOPPED
:
SetLastError
(
ERROR_SERVICE_NOT_ACTIVE
);
return
FALSE
;
case
SERVICE_START_PENDING
:
if
(
dwControl
==
SERVICE_CONTROL_STOP
)
break
;
/* fall thru */
case
SERVICE_STOP_PENDING
:
SetLastError
(
ERROR_SERVICE_CANNOT_ACCEPT_CTRL
);
return
FALSE
;
}
}
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