Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d1331e62
Commit
d1331e62
authored
Feb 27, 2007
by
Alessandro Pignotti
Committed by
Alexandre Julliard
Mar 01, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplay: Directplay should initialize session Guid, with conformance tests.
parent
5c9edfd4
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
123 additions
and
1 deletion
+123
-1
.gitignore
.gitignore
+4
-0
Makefile.in
Makefile.in
+2
-0
configure
configure
+3
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/Makefile.in
+1
-0
dplay.c
dlls/dplayx/dplay.c
+5
-1
Makefile.in
dlls/dplayx/tests/Makefile.in
+14
-0
dplayx.c
dlls/dplayx/tests/dplayx.c
+89
-0
Makefile.in
programs/winetest/Makefile.in
+3
-0
winetest.rc
programs/winetest/winetest.rc
+1
-0
No files found.
.gitignore
View file @
d1331e62
...
...
@@ -213,6 +213,9 @@ dlls/dnsapi/tests/testlist.c
dlls/dplay/libdplay.def
dlls/dplay/version.res
dlls/dplayx/libdplayx.def
dlls/dplayx/tests/*.ok
dlls/dplayx/tests/dplayx_crosstest.exe
dlls/dplayx/tests/testlist.c
dlls/dplayx/version.res
dlls/dpnet/libdpnet.def
dlls/dpnet/version.res
...
...
@@ -803,6 +806,7 @@ programs/winetest/d3d9_test.exe
programs/winetest/ddraw_test.exe
programs/winetest/dinput_test.exe
programs/winetest/dnsapi_test.exe
programs/winetest/dplayx_test.exe
programs/winetest/dsound_test.exe
programs/winetest/gdi32_test.exe
programs/winetest/hlink_test.exe
...
...
Makefile.in
View file @
d1331e62
...
...
@@ -216,6 +216,7 @@ ALL_MAKEFILES = \
dlls/dnsapi/tests/Makefile
\
dlls/dplay/Makefile
\
dlls/dplayx/Makefile
\
dlls/dplayx/tests/Makefile
\
dlls/dpnet/Makefile
\
dlls/dpnhpast/Makefile
\
dlls/dsound/Makefile
\
...
...
@@ -549,6 +550,7 @@ dlls/dnsapi/Makefile: dlls/dnsapi/Makefile.in dlls/Makedll.rules
dlls/dnsapi/tests/Makefile
:
dlls/dnsapi/tests/Makefile.in dlls/Maketest.rules
dlls/dplay/Makefile
:
dlls/dplay/Makefile.in dlls/Makedll.rules
dlls/dplayx/Makefile
:
dlls/dplayx/Makefile.in dlls/Makedll.rules
dlls/dplayx/tests/Makefile
:
dlls/dplayx/tests/Makefile.in dlls/Maketest.rules
dlls/dpnet/Makefile
:
dlls/dpnet/Makefile.in dlls/Makedll.rules
dlls/dpnhpast/Makefile
:
dlls/dpnhpast/Makefile.in dlls/Makedll.rules
dlls/dsound/Makefile
:
dlls/dsound/Makefile.in dlls/Makedll.rules
...
...
configure
View file @
d1331e62
...
...
@@ -20563,6 +20563,8 @@ ac_config_files="$ac_config_files dlls/dplay/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/dplayx/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/dplayx/tests/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/dpnet/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/dpnhpast/Makefile"
...
...
@@ -21709,6 +21711,7 @@ do
"dlls/dnsapi/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/dnsapi/tests/Makefile" ;;
"dlls/dplay/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/dplay/Makefile" ;;
"dlls/dplayx/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/dplayx/Makefile" ;;
"dlls/dplayx/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/dplayx/tests/Makefile" ;;
"dlls/dpnet/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/dpnet/Makefile" ;;
"dlls/dpnhpast/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/dpnhpast/Makefile" ;;
"dlls/dsound/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/dsound/Makefile" ;;
...
...
configure.ac
View file @
d1331e62
...
...
@@ -1586,6 +1586,7 @@ AC_CONFIG_FILES([dlls/dnsapi/Makefile])
AC_CONFIG_FILES([dlls/dnsapi/tests/Makefile])
AC_CONFIG_FILES([dlls/dplay/Makefile])
AC_CONFIG_FILES([dlls/dplayx/Makefile])
AC_CONFIG_FILES([dlls/dplayx/tests/Makefile])
AC_CONFIG_FILES([dlls/dpnet/Makefile])
AC_CONFIG_FILES([dlls/dpnhpast/Makefile])
AC_CONFIG_FILES([dlls/dsound/Makefile])
...
...
dlls/Makefile.in
View file @
d1331e62
...
...
@@ -233,6 +233,7 @@ TESTSUBDIRS = \
ddraw/tests
\
dinput/tests
\
dnsapi/tests
\
dplayx/tests
\
dsound/tests
\
gdi32/tests
\
hlink/tests
\
...
...
dlls/dplayx/dplay.c
View file @
d1331e62
...
...
@@ -3244,7 +3244,11 @@ static HRESULT WINAPI DP_SetSessionDesc
HeapFree
(
GetProcessHeap
(),
0
,
This
->
dp2
->
lpSessionDesc
);
This
->
dp2
->
lpSessionDesc
=
lpTempSessDesc
;
if
(
bInitial
)
{
/*Initializing session GUID*/
CoCreateGuid
(
&
(
This
->
dp2
->
lpSessionDesc
->
guidInstance
)
);
}
/* Set the new */
DP_CopySessionDesc
(
This
->
dp2
->
lpSessionDesc
,
lpSessDesc
,
bAnsi
);
...
...
dlls/dplayx/tests/Makefile.in
0 → 100644
View file @
d1331e62
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
dplayx.dll
IMPORTS
=
ole32 kernel32
EXTRALIBS
=
-ldxguid
CTESTS
=
\
dplayx.c
@MAKE_TEST_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
dlls/dplayx/tests/dplayx.c
0 → 100644
View file @
d1331e62
/* DirectPlay Conformance Tests
*
* Copyright 2007 - Alessandro Pignotti
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/test.h"
#include <dplay.h>
static
BOOL
validSP
=
FALSE
;
/*This global variable is needed until wine has a working service provider
implementation*/
static
BOOL
CALLBACK
EnumConnectionsCallback
(
LPCGUID
lpguidSP
,
LPVOID
lpConnection
,
DWORD
dwConnectionSize
,
LPCDPNAME
lpName
,
DWORD
dwFlags
,
LPVOID
lpContext
)
{
HRESULT
hr
;
if
(
IsEqualGUID
(
lpguidSP
,
&
DPSPGUID_TCPIP
))
{
/*I'm forcing TCP/IP Sevice provider*/
hr
=
IDirectPlayX_InitializeConnection
((
LPDIRECTPLAY4
)
lpContext
,
lpConnection
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"It's not possible to initialize TCP/IP service provider
\n
"
);
if
(
SUCCEEDED
(
hr
))
validSP
=
TRUE
;
return
FALSE
;
}
return
TRUE
;
}
static
void
test_session_guid
(
LPDIRECTPLAY4
pDP
)
{
GUID
appGuid
;
GUID
zeroGuid
;
DPSESSIONDESC2
sessionDesc
;
LPDPSESSIONDESC2
newSession
;
DWORD
sessionSize
;
static
char
name
[]
=
"DPlay conformance test"
;
CoCreateGuid
(
&
appGuid
);
IDirectPlayX_EnumConnections
(
pDP
,
&
appGuid
,
EnumConnectionsCallback
,
pDP
,
0
);
if
(
validSP
)
{
memset
(
&
sessionDesc
,
0
,
sizeof
(
DPSESSIONDESC2
));
memset
(
&
zeroGuid
,
0
,
16
);
sessionDesc
.
dwSize
=
sizeof
(
DPSESSIONDESC2
);
memcpy
(
&
sessionDesc
.
guidApplication
,
&
appGuid
,
16
);
sessionDesc
.
dwFlags
=
DPSESSION_CLIENTSERVER
;
sessionDesc
.
lpszSessionNameA
=
name
;
sessionDesc
.
dwMaxPlayers
=
10
;
sessionDesc
.
dwCurrentPlayers
=
0
;
IDirectPlayX_Open
(
pDP
,
&
sessionDesc
,
DPOPEN_CREATE
);
/* I read the sessiondesc from directplay in a fresh memory location,
because directplay does not touch the original struct, but saves
internally a version with the session guid set*/
IDirectPlayX_GetSessionDesc
(
pDP
,
NULL
,
&
sessionSize
);
newSession
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sessionSize
);
IDirectPlayX_GetSessionDesc
(
pDP
,
newSession
,
&
sessionSize
);
todo_wine
ok
(
!
IsEqualGUID
(
&
newSession
->
guidInstance
,
&
zeroGuid
),
"Session guid not initialized"
);
HeapFree
(
GetProcessHeap
(),
0
,
newSession
);
}
}
START_TEST
(
dplayx
)
{
LPDIRECTPLAY4
pDP
;
CoInitialize
(
NULL
);
CoCreateInstance
(
&
CLSID_DirectPlay
,
NULL
,
CLSCTX_ALL
,
&
IID_IDirectPlay4A
,
(
VOID
**
)
&
pDP
);
test_session_guid
(
pDP
);
IDirectPlayX_Release
(
pDP
);
CoUninitialize
();
}
programs/winetest/Makefile.in
View file @
d1331e62
...
...
@@ -36,6 +36,7 @@ TESTBINS = \
ddraw_test.exe
\
dinput_test.exe
\
dnsapi_test.exe
\
dplayx_test.exe
\
dsound_test.exe
\
gdi32_test.exe
\
hlink_test.exe
\
...
...
@@ -109,6 +110,8 @@ dinput_test.exe: $(DLLDIR)/dinput/tests/dinput_test.exe$(DLLEXT)
cp
$(DLLDIR)
/dinput/tests/dinput_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
dnsapi_test.exe
:
$(DLLDIR)/dnsapi/tests/dnsapi_test.exe$(DLLEXT)
cp
$(DLLDIR)
/dnsapi/tests/dnsapi_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
dplayx_test.exe
:
$(DLLDIR)/dplayx/tests/dplayx_test.exe$(DLLEXT)
cp
$(DLLDIR)
/dplayx/tests/dplayx_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
dsound_test.exe
:
$(DLLDIR)/dsound/tests/dsound_test.exe$(DLLEXT)
cp
$(DLLDIR)
/dsound/tests/dsound_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
gdi32_test.exe
:
$(DLLDIR)/gdi32/tests/gdi32_test.exe$(DLLEXT)
...
...
programs/winetest/winetest.rc
View file @
d1331e62
...
...
@@ -159,6 +159,7 @@ d3d9_test.exe TESTRES "d3d9_test.exe"
ddraw_test.exe TESTRES "ddraw_test.exe"
dinput_test.exe TESTRES "dinput_test.exe"
dnsapi_test.exe TESTRES "dnsapi_test.exe"
dplayx_test.exe TESTRES "dplayx_test.exe"
dsound_test.exe TESTRES "dsound_test.exe"
gdi32_test.exe TESTRES "gdi32_test.exe"
hlink_test.exe TESTRES "hlink_test.exe"
...
...
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