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
de679af4
Commit
de679af4
authored
Sep 29, 2020
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Add QueryServiceStatusEx test for the EventLog service.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8e54cad6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
service.c
dlls/advapi32/tests/service.c
+22
-0
winsvc.h
include/winsvc.h
+3
-0
No files found.
dlls/advapi32/tests/service.c
View file @
de679af4
...
...
@@ -2684,6 +2684,7 @@ static void test_EventLog(void)
DWORD
size
;
BOOL
ret
;
QUERY_SERVICE_CONFIGA
*
config
;
SERVICE_STATUS_PROCESS
status
;
scm_handle
=
OpenSCManagerA
(
NULL
,
NULL
,
GENERIC_READ
);
ok
(
scm_handle
!=
NULL
,
"OpenSCManager error %u
\n
"
,
GetLastError
());
...
...
@@ -2719,6 +2720,27 @@ todo_wine
HeapFree
(
GetProcessHeap
(),
0
,
config
);
memset
(
&
status
,
0
,
sizeof
(
status
));
size
=
sizeof
(
status
);
ret
=
QueryServiceStatusEx
(
svc_handle
,
SC_STATUS_PROCESS_INFO
,
(
BYTE
*
)
&
status
,
size
,
&
size
);
ok
(
ret
,
"QueryServiceStatusEx error %u
\n
"
,
GetLastError
());
ok
(
status
.
dwServiceType
==
SERVICE_WIN32_SHARE_PROCESS
||
status
.
dwServiceType
==
(
SERVICE_WIN32_SHARE_PROCESS
|
SERVICE_WIN32_OWN_PROCESS
)
/* Win10 */
,
"got %#x
\n
"
,
status
.
dwServiceType
);
ok
(
status
.
dwCurrentState
==
SERVICE_RUNNING
,
"got %#x
\n
"
,
status
.
dwCurrentState
);
todo_wine
ok
(
status
.
dwControlsAccepted
==
SERVICE_ACCEPT_SHUTDOWN
/* XP */
||
status
.
dwControlsAccepted
==
(
SERVICE_ACCEPT_STOP
|
SERVICE_ACCEPT_SHUTDOWN
)
/* 2008 */
||
status
.
dwControlsAccepted
==
(
SERVICE_ACCEPT_STOP
|
SERVICE_ACCEPT_TIMECHANGE
|
SERVICE_ACCEPT_SHUTDOWN
),
"got %#x
\n
"
,
status
.
dwControlsAccepted
);
ok
(
status
.
dwWin32ExitCode
==
0
,
"got %#x
\n
"
,
status
.
dwWin32ExitCode
);
ok
(
status
.
dwServiceSpecificExitCode
==
0
,
"got %#x
\n
"
,
status
.
dwServiceSpecificExitCode
);
ok
(
status
.
dwCheckPoint
==
0
,
"got %#x
\n
"
,
status
.
dwCheckPoint
);
ok
(
status
.
dwWaitHint
==
0
,
"got %#x
\n
"
,
status
.
dwWaitHint
);
ok
(
status
.
dwProcessId
!=
0
,
"got %#x
\n
"
,
status
.
dwProcessId
);
ok
(
status
.
dwServiceFlags
==
0
||
status
.
dwServiceFlags
==
SERVICE_RUNS_IN_SYSTEM_PROCESS
/* XP */
,
"got %#x
\n
"
,
status
.
dwServiceFlags
);
CloseServiceHandle
(
svc_handle
);
CloseServiceHandle
(
scm_handle
);
}
...
...
include/winsvc.h
View file @
de679af4
...
...
@@ -85,6 +85,8 @@ static const WCHAR SERVICES_FAILED_DATABASEW[] = { 'S','e','r','v','i','c','e','
#define SERVICE_ACCEPT_POWEREVENT 0x00000040
#define SERVICE_ACCEPT_SESSIONCHANGE 0x00000080
#define SERVICE_ACCEPT_PRESHUTDOWN 0x00000100
#define SERVICE_ACCEPT_TIMECHANGE 0x00000200
#define SERVICE_ACCEPT_TRIGGEREVENT 0x00000400
/* Service Control Manager Object access types */
#define SC_MANAGER_CONNECT 0x0001
...
...
@@ -124,6 +126,7 @@ static const WCHAR SERVICES_FAILED_DATABASEW[] = { 'S','e','r','v','i','c','e','
#define SERVICE_NO_CHANGE 0xffffffff
#define SERVICE_RUNS_IN_SYSTEM_PROCESS 0x00000001
/* Handle types */
...
...
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