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
1278ea3a
Commit
1278ea3a
authored
Aug 05, 2008
by
Ismael Barros
Committed by
Alexandre Julliard
Aug 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx: Tests for GroupOwner.
parent
58837a6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
0 deletions
+77
-0
dplayx.c
dlls/dplayx/tests/dplayx.c
+77
-0
No files found.
dlls/dplayx/tests/dplayx.c
View file @
1278ea3a
...
...
@@ -3398,6 +3398,82 @@ static void test_CreateGroup(void)
}
/* GroupOwner */
static
void
test_GroupOwner
(
void
)
{
LPDIRECTPLAY4
pDP
[
2
];
DPSESSIONDESC2
dpsd
;
DPID
dpid
[
2
],
idGroup
,
idOwner
;
HRESULT
hr
;
UINT
i
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
CoCreateInstance
(
&
CLSID_DirectPlay
,
NULL
,
CLSCTX_ALL
,
&
IID_IDirectPlay4A
,
(
LPVOID
*
)
&
pDP
[
i
]
);
}
ZeroMemory
(
&
dpsd
,
sizeof
(
DPSESSIONDESC2
)
);
dpsd
.
dwSize
=
sizeof
(
DPSESSIONDESC2
);
dpsd
.
guidApplication
=
appGuid
;
dpsd
.
dwMaxPlayers
=
10
;
idGroup
=
0
;
idOwner
=
0
;
/* Service provider not initialized */
hr
=
IDirectPlayX_GetGroupOwner
(
pDP
[
0
],
idGroup
,
&
idOwner
);
todo_wine
checkHR
(
DPERR_UNINITIALIZED
,
hr
);
check
(
0
,
idOwner
);
if
(
hr
==
DP_OK
)
{
skip
(
"GetGroupOwner not implemented
\n
"
);
return
;
}
for
(
i
=
0
;
i
<
2
;
i
++
)
init_TCPIP_provider
(
pDP
[
i
],
"127.0.0.1"
,
0
);
hr
=
IDirectPlayX_Open
(
pDP
[
0
],
&
dpsd
,
DPOPEN_CREATE
);
checkHR
(
DP_OK
,
hr
);
hr
=
IDirectPlayX_EnumSessions
(
pDP
[
1
],
&
dpsd
,
0
,
EnumSessions_cb_join
,
(
LPVOID
)
pDP
[
1
],
0
);
checkHR
(
DP_OK
,
hr
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
hr
=
IDirectPlayX_CreatePlayer
(
pDP
[
i
],
&
dpid
[
i
],
NULL
,
NULL
,
NULL
,
0
,
0
);
checkHR
(
DP_OK
,
hr
);
}
/* Invalid group */
hr
=
IDirectPlayX_GetGroupOwner
(
pDP
[
0
],
idGroup
,
&
idOwner
);
checkHR
(
DPERR_INVALIDGROUP
,
hr
);
hr
=
IDirectPlayX_CreateGroup
(
pDP
[
0
],
&
idGroup
,
NULL
,
NULL
,
0
,
0
);
checkHR
(
DP_OK
,
hr
);
/* Fails, because we need a lobby session */
hr
=
IDirectPlayX_GetGroupOwner
(
pDP
[
0
],
idGroup
,
&
idOwner
);
checkHR
(
DPERR_UNSUPPORTED
,
hr
);
/* TODO:
* - Make this work
* - Check migration of the ownership of a group
* when the owner leaves
*/
IDirectPlayX_Release
(
pDP
[
0
]
);
IDirectPlayX_Release
(
pDP
[
1
]
);
}
START_TEST
(
dplayx
)
{
...
...
@@ -3421,6 +3497,7 @@ START_TEST(dplayx)
test_GetPlayerFlags
();
test_CreateGroup
();
test_GroupOwner
();
CoUninitialize
();
}
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