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
d142447c
Commit
d142447c
authored
Jul 31, 2008
by
Ismael Barros
Committed by
Alexandre Julliard
Aug 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx: Tests for InitializeConnection.
parent
4ab75e12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
0 deletions
+57
-0
dplay.c
dlls/dplayx/dplay.c
+10
-0
dplayx.c
dlls/dplayx/tests/dplayx.c
+47
-0
No files found.
dlls/dplayx/dplay.c
View file @
d142447c
...
...
@@ -4227,11 +4227,21 @@ static HRESULT WINAPI DP_IF_InitializeConnection
TRACE
(
"(%p)->(%p,0x%08x,%u)
\n
"
,
This
,
lpConnection
,
dwFlags
,
bAnsi
);
if
(
lpConnection
==
NULL
)
{
return
DPERR_INVALIDPARAMS
;
}
if
(
dwFlags
!=
0
)
{
return
DPERR_INVALIDFLAGS
;
}
if
(
This
->
dp2
->
connectionInitialized
!=
NO_PROVIDER
)
{
return
DPERR_ALREADYINITIALIZED
;
}
/* Find out what the requested SP is and how large this buffer is */
hr
=
DPL_EnumAddress
(
DP_GetSpLpGuidFromCompoundAddress
,
lpConnection
,
dwAddrSize
,
&
guidSP
);
...
...
dlls/dplayx/tests/dplayx.c
View file @
d142447c
...
...
@@ -707,6 +707,52 @@ static void test_EnumConnections(void)
IDirectPlayX_Release
(
pDP
);
}
/* InitializeConnection */
static
BOOL
CALLBACK
EnumConnections_cb2
(
LPCGUID
lpguidSP
,
LPVOID
lpConnection
,
DWORD
dwConnectionSize
,
LPCDPNAME
lpName
,
DWORD
dwFlags
,
LPVOID
lpContext
)
{
LPDIRECTPLAY4
pDP
=
(
LPDIRECTPLAY4
)
lpContext
;
HRESULT
hr
;
/* Incorrect parameters */
hr
=
IDirectPlayX_InitializeConnection
(
pDP
,
NULL
,
1
);
checkHR
(
DPERR_INVALIDPARAMS
,
hr
);
hr
=
IDirectPlayX_InitializeConnection
(
pDP
,
lpConnection
,
1
);
checkHR
(
DPERR_INVALIDFLAGS
,
hr
);
/* Normal operation.
We're only interested in ensuring that the TCP/IP provider works */
if
(
IsEqualGUID
(
lpguidSP
,
&
DPSPGUID_TCPIP
)
)
{
hr
=
IDirectPlayX_InitializeConnection
(
pDP
,
lpConnection
,
0
);
todo_wine
checkHR
(
DP_OK
,
hr
);
hr
=
IDirectPlayX_InitializeConnection
(
pDP
,
lpConnection
,
0
);
todo_wine
checkHR
(
DPERR_ALREADYINITIALIZED
,
hr
);
}
return
TRUE
;
}
static
void
test_InitializeConnection
(
void
)
{
LPDIRECTPLAY4
pDP
;
CoCreateInstance
(
&
CLSID_DirectPlay
,
NULL
,
CLSCTX_ALL
,
&
IID_IDirectPlay4A
,
(
LPVOID
*
)
&
pDP
);
IDirectPlayX_EnumConnections
(
pDP
,
&
appGuid
,
EnumConnections_cb2
,
(
LPVOID
)
pDP
,
0
);
IDirectPlayX_Release
(
pDP
);
}
START_TEST
(
dplayx
)
{
...
...
@@ -714,6 +760,7 @@ START_TEST(dplayx)
test_DirectPlayCreate
();
test_EnumConnections
();
test_InitializeConnection
();
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