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
8db78fdd
Commit
8db78fdd
authored
Feb 14, 2017
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet/tests: Add IDirectPlay8Peer EnumHost Tests.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
98040833
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
client.c
dlls/dpnet/tests/client.c
+39
-1
No files found.
dlls/dpnet/tests/client.c
View file @
8db78fdd
...
...
@@ -576,15 +576,22 @@ static void test_enum_service_providers_peer(void)
static
void
test_enum_hosts_peer
(
void
)
{
HRESULT
hr
;
IDirectPlay8Peer
*
peer2
;
IDirectPlay8Address
*
host
=
NULL
;
IDirectPlay8Address
*
local
=
NULL
;
DPN_APPLICATION_DESC
appdesc
;
DPNHANDLE
async
=
0
;
DPNHANDLE
async
=
0
,
async2
=
0
;
ResetEvent
(
enumevent
);
handlecnt
=
0
;
memset
(
&
appdesc
,
0
,
sizeof
(
DPN_APPLICATION_DESC
)
);
appdesc
.
dwSize
=
sizeof
(
DPN_APPLICATION_DESC
);
appdesc
.
guidApplication
=
appguid
;
hr
=
CoCreateInstance
(
&
CLSID_DirectPlay8Peer
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectPlay8Peer
,
(
void
**
)
&
peer2
);
ok
(
hr
==
S_OK
,
"CoCreateInstance failed with 0x%x
\n
"
,
hr
);
hr
=
CoCreateInstance
(
&
CLSID_DirectPlay8Address
,
NULL
,
CLSCTX_ALL
,
&
IID_IDirectPlay8Address
,
(
LPVOID
*
)
&
local
);
ok
(
hr
==
S_OK
,
"IDirectPlay8Address failed with 0x%08x
\n
"
,
hr
);
...
...
@@ -608,6 +615,37 @@ static void test_enum_hosts_peer(void)
hr
=
IDirectPlay8Peer_CancelAsyncOperation
(
peer
,
async
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08x
\n
"
,
hr
);
/* No Initialize has been called on peer2. */
hr
=
IDirectPlay8Peer_EnumHosts
(
peer2
,
&
appdesc
,
host
,
local
,
NULL
,
0
,
INFINITE
,
0
,
INFINITE
,
NULL
,
&
async
,
0
);
todo_wine
ok
(
hr
==
DPNERR_UNINITIALIZED
,
"IDirectPlay8Peer_EnumHosts failed with 0x%08x
\n
"
,
hr
);
/* Since we are running asynchronously, EnumHosts returns DPNSUCCESS_PENDING. */
hr
=
IDirectPlay8Peer_EnumHosts
(
peer
,
&
appdesc
,
host
,
local
,
NULL
,
0
,
INFINITE
,
0
,
INFINITE
,
NULL
,
&
async
,
0
);
todo_wine
ok
(
hr
==
DPNSUCCESS_PENDING
,
"IDirectPlay8Peer_EnumHosts failed with 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
async
,
"No Handle returned
\n
"
);
hr
=
IDirectPlay8Peer_EnumHosts
(
peer
,
&
appdesc
,
host
,
local
,
NULL
,
0
,
INFINITE
,
0
,
INFINITE
,
NULL
,
&
async2
,
0
);
todo_wine
ok
(
hr
==
DPNSUCCESS_PENDING
,
"IDirectPlay8Peer_EnumHosts failed with 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
async2
,
"No Handle returned
\n
"
);
todo_wine
ok
(
async2
!=
async
,
"Same handle returned.
\n
"
);
WaitForSingleObject
(
enumevent
,
1000
);
lastAsyncCode
=
E_FAIL
;
lastAsyncHandle
=
0xdeadbeef
;
hr
=
IDirectPlay8Peer_CancelAsyncOperation
(
peer
,
async
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
lastAsyncCode
==
DPNERR_USERCANCEL
,
"got 0x%08x
\n
"
,
lastAsyncCode
);
todo_wine
ok
(
lastAsyncHandle
==
async
,
"got 0x%08x
\n
"
,
async
);
lastAsyncCode
=
E_FAIL
;
lastAsyncHandle
=
0xdeadbeef
;
hr
=
IDirectPlay8Peer_CancelAsyncOperation
(
peer
,
async2
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"IDirectPlay8Peer_CancelAsyncOperation failed with 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
lastAsyncCode
==
DPNERR_USERCANCEL
,
"got 0x%08x
\n
"
,
lastAsyncCode
);
todo_wine
ok
(
lastAsyncHandle
==
async2
,
"got 0x%08x
\n
"
,
async2
);
IDirectPlay8Peer_Release
(
peer2
);
IDirectPlay8Address_Release
(
local
);
IDirectPlay8Address_Release
(
host
);
}
...
...
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