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
2bb3636a
Commit
2bb3636a
authored
Mar 03, 2017
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Mar 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx: Skip over unknown DataTypes guids in EnumAddressTypes.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b027a7db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
2 deletions
+50
-2
dplobby.c
dlls/dplayx/dplobby.c
+1
-2
dplayx.c
dlls/dplayx/tests/dplayx.c
+49
-0
No files found.
dlls/dplayx/dplobby.c
View file @
2bb3636a
...
...
@@ -1726,8 +1726,7 @@ HRESULT DPL_CreateCompoundAddress
}
else
{
ERR
(
"Unknown GUID %s
\n
"
,
debugstr_guid
(
&
lpElements
->
guidDataType
)
);
return
DPERR_INVALIDFLAGS
;
WARN
(
"Skipping Unknown GUID %s
\n
"
,
debugstr_guid
(
&
lpElements
->
guidDataType
)
);
}
}
...
...
dlls/dplayx/tests/dplayx.c
View file @
2bb3636a
...
...
@@ -64,6 +64,7 @@ static HRESULT (WINAPI *pDirectPlayCreate)( GUID *GUID, LPDIRECTPLAY *lplpDP, IU
DEFINE_GUID
(
appGuid
,
0xbdcfe03e
,
0xf0ec
,
0x415b
,
0x82
,
0x11
,
0x6f
,
0x86
,
0xd8
,
0x19
,
0x7f
,
0xe1
);
DEFINE_GUID
(
appGuid2
,
0x93417d3f
,
0x7d26
,
0x46ba
,
0xb5
,
0x76
,
0xfe
,
0x4b
,
0x20
,
0xbb
,
0xad
,
0x70
);
DEFINE_GUID
(
GUID_NULL
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
DEFINE_GUID
(
invalid_guid
,
0x7b48b707
,
0x0034
,
0xc000
,
0x02
,
0x00
,
0x00
,
0x00
,
0xec
,
0xf6
,
0x32
,
0x00
);
typedef
struct
tagCallbackData
...
...
@@ -1128,6 +1129,53 @@ static void test_GetCaps(void)
IDirectPlayX_Release
(
pDP
);
}
static
void
test_EnumAddressTypes
(
void
)
{
IDirectPlay4
*
pDP
;
HRESULT
hr
;
DPCOMPOUNDADDRESSELEMENT
addressElements
[
2
];
LPVOID
pAddress
=
NULL
;
DWORD
dwAddressSize
=
0
;
IDirectPlayLobby3
*
pDPL
;
WORD
port
=
6001
;
hr
=
CoCreateInstance
(
&
CLSID_DirectPlay
,
NULL
,
CLSCTX_ALL
,
&
IID_IDirectPlay4A
,
(
LPVOID
*
)
&
pDP
);
ok
(
SUCCEEDED
(
hr
),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed
\n
"
);
if
(
FAILED
(
hr
))
return
;
hr
=
CoCreateInstance
(
&
CLSID_DirectPlayLobby
,
NULL
,
CLSCTX_ALL
,
&
IID_IDirectPlayLobby3A
,
(
LPVOID
*
)
&
pDPL
);
ok
(
SUCCEEDED
(
hr
),
"CCI of CLSID_DirectPlayLobby / IID_IDirectPlayLobby3A failed
\n
"
);
if
(
FAILED
(
hr
))
return
;
addressElements
[
0
].
guidDataType
=
DPAID_ServiceProvider
;
addressElements
[
0
].
dwDataSize
=
sizeof
(
GUID
);
addressElements
[
0
].
lpData
=
(
void
*
)
&
DPSPGUID_TCPIP
;
addressElements
[
1
].
guidDataType
=
invalid_guid
;
addressElements
[
1
].
dwDataSize
=
sizeof
(
WORD
);
addressElements
[
1
].
lpData
=
&
port
;
hr
=
IDirectPlayLobby_CreateCompoundAddress
(
pDPL
,
addressElements
,
2
,
NULL
,
&
dwAddressSize
);
checkHR
(
DPERR_BUFFERTOOSMALL
,
hr
);
if
(
hr
==
DPERR_BUFFERTOOSMALL
)
{
pAddress
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
dwAddressSize
);
hr
=
IDirectPlayLobby_CreateCompoundAddress
(
pDPL
,
addressElements
,
2
,
pAddress
,
&
dwAddressSize
);
checkHR
(
DP_OK
,
hr
);
}
IDirectPlayX_Close
(
pDP
);
IDirectPlayX_Release
(
pDP
);
IDirectPlayLobby_Release
(
pDPL
);
HeapFree
(
GetProcessHeap
(),
0
,
pAddress
);
}
/* Open */
static
BOOL
CALLBACK
EnumSessions_cb2
(
LPCDPSESSIONDESC2
lpThisSD
,
...
...
@@ -6894,6 +6942,7 @@ START_TEST(dplayx)
test_EnumConnections
();
test_InitializeConnection
();
test_GetCaps
();
test_EnumAddressTypes
();
if
(
!
winetest_interactive
)
{
...
...
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