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
deee97d9
Commit
deee97d9
authored
May 06, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
May 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Add another test.
parent
d2364d5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
service.c
dlls/advapi32/tests/service.c
+17
-0
No files found.
dlls/advapi32/tests/service.c
View file @
deee97d9
...
...
@@ -94,6 +94,8 @@ static void test_open_scm(void)
static
void
test_open_svc
(
void
)
{
SC_HANDLE
scm_handle
,
svc_handle
;
CHAR
displayname
[
4096
];
DWORD
displaysize
;
/* All NULL (invalid access rights) */
SetLastError
(
0xdeadbeef
);
...
...
@@ -135,6 +137,21 @@ static void test_open_svc(void)
"Expected ERROR_SUCCESS or 0xdeadbeef, got %d
\n
"
,
GetLastError
());
CloseServiceHandle
(
svc_handle
);
}
/* Test to show we can't open a service with the displayname */
/* Retrieve the needed size for the buffer */
displaysize
=
0
;
GetServiceDisplayNameA
(
scm_handle
,
spooler
,
NULL
,
&
displaysize
);
/* Get the displayname */
GetServiceDisplayNameA
(
scm_handle
,
spooler
,
displayname
,
&
displaysize
);
/* Try to open the service with this displayname */
svc_handle
=
OpenServiceA
(
scm_handle
,
displayname
,
GENERIC_READ
);
ok
(
!
svc_handle
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_SERVICE_DOES_NOT_EXIST
,
"Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d
\n
"
,
GetLastError
());
/* Just in case */
CloseServiceHandle
(
svc_handle
);
CloseServiceHandle
(
scm_handle
);
}
...
...
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