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
608b57ea
Commit
608b57ea
authored
Aug 24, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Skip some tests if QueryServiceStatusEx is missing.
parent
74a0a3fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
service.c
dlls/advapi32/tests/service.c
+13
-4
No files found.
dlls/advapi32/tests/service.c
View file @
608b57ea
...
...
@@ -949,6 +949,12 @@ static void test_query_svc(void)
CloseServiceHandle
(
svc_handle
);
/* More or less the same tests for QueryServiceStatusEx */
if
(
!
pQueryServiceStatusEx
)
{
win_skip
(
"QueryServiceStatusEx not available
\n
"
);
CloseServiceHandle
(
scm_handle
);
return
;
}
/* Open service with not enough rights to query the status */
svc_handle
=
OpenServiceA
(
scm_handle
,
spooler
,
STANDARD_RIGHTS_READ
);
...
...
@@ -2065,10 +2071,13 @@ static DWORD try_start_stop(SC_HANDLE svc_handle, const char* name, int todo)
le1
=
GetLastError
();
ok
(
!
ret
,
"%s: StartServiceA() should have failed
\n
"
,
name
);
ret
=
pQueryServiceStatusEx
(
svc_handle
,
SC_STATUS_PROCESS_INFO
,
(
BYTE
*
)
&
statusproc
,
sizeof
(
statusproc
),
&
needed
);
ok
(
ret
,
"%s: QueryServiceStatusEx() failed le=%u
\n
"
,
name
,
GetLastError
());
todo_wine
ok
(
statusproc
.
dwCurrentState
==
SERVICE_STOPPED
,
"%s: should be stopped state=%x
\n
"
,
name
,
statusproc
.
dwCurrentState
);
todo_wine
ok
(
statusproc
.
dwProcessId
==
0
,
"%s: ProcessId should be 0 instead of %x
\n
"
,
name
,
statusproc
.
dwProcessId
);
if
(
pQueryServiceStatusEx
)
{
ret
=
pQueryServiceStatusEx
(
svc_handle
,
SC_STATUS_PROCESS_INFO
,
(
BYTE
*
)
&
statusproc
,
sizeof
(
statusproc
),
&
needed
);
ok
(
ret
,
"%s: QueryServiceStatusEx() failed le=%u
\n
"
,
name
,
GetLastError
());
todo_wine
ok
(
statusproc
.
dwCurrentState
==
SERVICE_STOPPED
,
"%s: should be stopped state=%x
\n
"
,
name
,
statusproc
.
dwCurrentState
);
todo_wine
ok
(
statusproc
.
dwProcessId
==
0
,
"%s: ProcessId should be 0 instead of %x
\n
"
,
name
,
statusproc
.
dwProcessId
);
}
ret
=
StartServiceA
(
svc_handle
,
0
,
NULL
);
le2
=
GetLastError
();
...
...
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