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
db892dec
Commit
db892dec
authored
Jul 05, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Jul 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Add tests for CloseServiceHandle.
parent
71982a42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
service.c
dlls/advapi32/tests/service.c
+28
-0
No files found.
dlls/advapi32/tests/service.c
View file @
db892dec
...
...
@@ -133,6 +133,33 @@ static void test_open_svc(void)
CloseServiceHandle
(
scm_handle
);
}
static
void
test_close
(
void
)
{
SC_HANDLE
handle
;
BOOL
ret
;
/* NULL handle */
SetLastError
(
0xdeadbeef
);
ret
=
CloseServiceHandle
(
NULL
);
todo_wine
{
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
}
/* TODO: Add some tests with invalid handles. These produce errors on Windows but crash on Wine */
/* Proper call */
handle
=
OpenSCManagerA
(
NULL
,
NULL
,
SC_MANAGER_CONNECT
);
SetLastError
(
0xdeadbeef
);
ret
=
CloseServiceHandle
(
handle
);
ok
(
ret
,
"Expected success
\n
"
);
ok
(
GetLastError
()
==
ERROR_IO_PENDING
/* W2K */
||
GetLastError
()
==
ERROR_SUCCESS
/* W2K3 */
||
GetLastError
()
==
0xdeadbeef
/* NT4, XP, Vista */
,
"Expected ERROR_SUCCESS, ERROR_IO_PENDING or 0xdeadbeef, got %d
\n
"
,
GetLastError
());
}
static
void
test_sequence
(
void
)
{
SC_HANDLE
scm_handle
,
svc_handle
;
...
...
@@ -264,6 +291,7 @@ START_TEST(service)
/* First some parameter checking */
test_open_scm
();
test_open_svc
();
test_close
();
/* Test the creation, querying and deletion of a service */
test_sequence
();
}
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