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
a2fbbd92
Commit
a2fbbd92
authored
Apr 22, 2007
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
Apr 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Make SERVICE_STATUS_PROCESS match the declaration in MSDN and PSDK.
parent
1d19c2b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
+21
-15
service.c
dlls/advapi32/service.c
+14
-14
winsvc.h
include/winsvc.h
+7
-1
No files found.
dlls/advapi32/service.c
View file @
a2fbbd92
...
@@ -1580,7 +1580,7 @@ BOOL WINAPI QueryServiceStatus(SC_HANDLE hService,
...
@@ -1580,7 +1580,7 @@ BOOL WINAPI QueryServiceStatus(SC_HANDLE hService,
ret
=
QueryServiceStatusEx
(
hService
,
SC_STATUS_PROCESS_INFO
,
(
LPBYTE
)
&
SvcStatusData
,
ret
=
QueryServiceStatusEx
(
hService
,
SC_STATUS_PROCESS_INFO
,
(
LPBYTE
)
&
SvcStatusData
,
sizeof
(
SERVICE_STATUS_PROCESS
),
NULL
);
sizeof
(
SERVICE_STATUS_PROCESS
),
NULL
);
if
(
ret
)
*
lpservicestatus
=
SvcStatusData
.
status
;
if
(
ret
)
memcpy
(
lpservicestatus
,
&
SvcStatusData
,
sizeof
(
SERVICE_STATUS
))
;
return
ret
;
return
ret
;
}
}
...
@@ -1642,20 +1642,20 @@ BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel,
...
@@ -1642,20 +1642,20 @@ BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel,
return
FALSE
;
return
FALSE
;
}
}
/* FIXME: this would be the pid from service_start_process() */
pSvcStatusData
->
dwProcessId
=
0
;
/* service is running in a process that is not a system process */
pSvcStatusData
->
dwServiceFlags
=
0
;
pipe
=
service_open_pipe
(
hsvc
->
name
);
pipe
=
service_open_pipe
(
hsvc
->
name
);
if
(
pipe
!=
INVALID_HANDLE_VALUE
)
if
(
pipe
!=
INVALID_HANDLE_VALUE
)
{
{
r
=
service_get_status
(
pipe
,
&
pSvcStatusData
->
status
);
r
=
service_get_status
(
pipe
,
(
LPSERVICE_STATUS
)
&
pSvcStatusData
);
CloseHandle
(
pipe
);
CloseHandle
(
pipe
);
if
(
r
)
if
(
r
)
return
TRUE
;
return
TRUE
;
}
}
/* FIXME: this would be the pid from service_start_process() */
pSvcStatusData
->
dwProcessId
=
0
;
/* service is running in a process that is not a system process */
pSvcStatusData
->
dwServiceFlags
=
0
;
TRACE
(
"Failed to read service status
\n
"
);
TRACE
(
"Failed to read service status
\n
"
);
/* read the service type from the registry */
/* read the service type from the registry */
...
@@ -1664,13 +1664,13 @@ BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel,
...
@@ -1664,13 +1664,13 @@ BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel,
if
(
r
!=
ERROR_SUCCESS
||
type
!=
REG_DWORD
)
if
(
r
!=
ERROR_SUCCESS
||
type
!=
REG_DWORD
)
val
=
0
;
val
=
0
;
pSvcStatusData
->
status
.
dwServiceType
=
val
;
pSvcStatusData
->
dwServiceType
=
val
;
pSvcStatusData
->
status
.
dwCurrentState
=
SERVICE_STOPPED
;
/* stopped */
pSvcStatusData
->
dwCurrentState
=
SERVICE_STOPPED
;
/* stopped */
pSvcStatusData
->
status
.
dwControlsAccepted
=
0
;
pSvcStatusData
->
dwControlsAccepted
=
0
;
pSvcStatusData
->
status
.
dwWin32ExitCode
=
ERROR_SERVICE_NEVER_STARTED
;
pSvcStatusData
->
dwWin32ExitCode
=
ERROR_SERVICE_NEVER_STARTED
;
pSvcStatusData
->
status
.
dwServiceSpecificExitCode
=
0
;
pSvcStatusData
->
dwServiceSpecificExitCode
=
0
;
pSvcStatusData
->
status
.
dwCheckPoint
=
0
;
pSvcStatusData
->
dwCheckPoint
=
0
;
pSvcStatusData
->
status
.
dwWaitHint
=
0
;
pSvcStatusData
->
dwWaitHint
=
0
;
return
TRUE
;
return
TRUE
;
}
}
...
...
include/winsvc.h
View file @
a2fbbd92
...
@@ -135,7 +135,13 @@ typedef struct _SERVICE_STATUS {
...
@@ -135,7 +135,13 @@ typedef struct _SERVICE_STATUS {
typedef
struct
_SERVICE_STATUS_PROCESS
typedef
struct
_SERVICE_STATUS_PROCESS
{
{
SERVICE_STATUS
status
;
DWORD
dwServiceType
;
DWORD
dwCurrentState
;
DWORD
dwControlsAccepted
;
DWORD
dwWin32ExitCode
;
DWORD
dwServiceSpecificExitCode
;
DWORD
dwCheckPoint
;
DWORD
dwWaitHint
;
DWORD
dwProcessId
;
DWORD
dwProcessId
;
DWORD
dwServiceFlags
;
DWORD
dwServiceFlags
;
}
SERVICE_STATUS_PROCESS
,
*
LPSERVICE_STATUS_PROCESS
;
}
SERVICE_STATUS_PROCESS
,
*
LPSERVICE_STATUS_PROCESS
;
...
...
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