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
6c33eb44
Commit
6c33eb44
authored
Apr 20, 2007
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
Apr 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Make QueryServiceStatus use QueryServiceStatusEx.
parent
af5f6325
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
39 deletions
+9
-39
service.c
dlls/advapi32/service.c
+9
-39
No files found.
dlls/advapi32/service.c
View file @
6c33eb44
...
...
@@ -1566,55 +1566,25 @@ BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs,
* QueryServiceStatus [ADVAPI32.@]
*
* PARAMS
* hService [
]
* lpservicestatus [
]
* hService [
I] Handle to service to get information about
* lpservicestatus [
O] buffer to receive the status information for the service
*
*/
BOOL
WINAPI
QueryServiceStatus
(
SC_HANDLE
hService
,
LPSERVICE_STATUS
lpservicestatus
)
{
struct
sc_service
*
hsvc
;
DWORD
size
,
type
,
val
;
HANDLE
pipe
;
LONG
r
;
SERVICE_STATUS_PROCESS
SvcStatusData
;
BOOL
ret
;
TRACE
(
"%p %p
\n
"
,
hService
,
lpservicestatus
);
hsvc
=
sc_handle_get_handle_data
(
hService
,
SC_HTYPE_SERVICE
);
if
(
!
hsvc
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
pipe
=
service_open_pipe
(
hsvc
->
name
);
if
(
pipe
!=
INVALID_HANDLE_VALUE
)
{
r
=
service_get_status
(
pipe
,
lpservicestatus
);
CloseHandle
(
pipe
);
if
(
r
)
return
TRUE
;
}
TRACE
(
"Failed to read service status
\n
"
);
/* read the service type from the registry */
size
=
sizeof
(
val
);
r
=
RegQueryValueExA
(
hsvc
->
hkey
,
"Type"
,
NULL
,
&
type
,
(
LPBYTE
)
&
val
,
&
size
);
if
(
r
!=
ERROR_SUCCESS
||
type
!=
REG_DWORD
)
val
=
0
;
lpservicestatus
->
dwServiceType
=
val
;
lpservicestatus
->
dwCurrentState
=
SERVICE_STOPPED
;
/* stopped */
lpservicestatus
->
dwControlsAccepted
=
0
;
lpservicestatus
->
dwWin32ExitCode
=
ERROR_SERVICE_NEVER_STARTED
;
lpservicestatus
->
dwServiceSpecificExitCode
=
0
;
lpservicestatus
->
dwCheckPoint
=
0
;
lpservicestatus
->
dwWaitHint
=
0
;
return
TRUE
;
ret
=
QueryServiceStatusEx
(
hService
,
SC_STATUS_PROCESS_INFO
,
(
LPBYTE
)
&
SvcStatusData
,
sizeof
(
SERVICE_STATUS_PROCESS
),
NULL
);
if
(
ret
)
*
lpservicestatus
=
SvcStatusData
.
status
;
return
ret
;
}
/******************************************************************************
* QueryServiceStatusEx [ADVAPI32.@]
*
...
...
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