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
b01fc1aa
Commit
b01fc1aa
authored
May 07, 2014
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: Implement IDirectPlay8Client GetSPCaps.
parent
329c70d9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
12 deletions
+35
-12
client.c
dlls/dpnet/client.c
+17
-3
dpnet_private.h
dlls/dpnet/dpnet_private.h
+2
-0
client.c
dlls/dpnet/tests/client.c
+16
-9
No files found.
dlls/dpnet/client.c
View file @
b01fc1aa
...
...
@@ -234,9 +234,21 @@ static HRESULT WINAPI IDirectPlay8ClientImpl_SetSPCaps(IDirectPlay8Client *iface
static
HRESULT
WINAPI
IDirectPlay8ClientImpl_GetSPCaps
(
IDirectPlay8Client
*
iface
,
const
GUID
*
const
pguidSP
,
DPN_SP_CAPS
*
const
pdpspCaps
,
const
DWORD
dwFlags
)
{
IDirectPlay8ClientImpl
*
This
=
impl_from_IDirectPlay8Client
(
iface
);
FIXME
(
"(%p):(%x): Stub
\n
"
,
This
,
dwFlags
);
return
DPN_OK
;
IDirectPlay8ClientImpl
*
This
=
impl_from_IDirectPlay8Client
(
iface
);
TRACE
(
"(%p)->(%p,%p,%x)
\n
"
,
This
,
pguidSP
,
pdpspCaps
,
dwFlags
);
if
(
!
This
->
msghandler
)
return
DPNERR_UNINITIALIZED
;
if
(
pdpspCaps
->
dwSize
!=
sizeof
(
DPN_SP_CAPS
))
{
return
DPNERR_INVALIDPARAM
;
}
*
pdpspCaps
=
This
->
spcaps
;
return
DPN_OK
;
}
static
HRESULT
WINAPI
IDirectPlay8ClientImpl_GetConnectionInfo
(
IDirectPlay8Client
*
iface
,
...
...
@@ -301,6 +313,8 @@ HRESULT DPNET_CreateDirectPlay8Client(IClassFactory *iface, IUnknown *pUnkOuter,
client
->
IDirectPlay8Client_iface
.
lpVtbl
=
&
DirectPlay8Client_Vtbl
;
client
->
ref
=
1
;
init_dpn_sp_caps
(
&
client
->
spcaps
);
hr
=
IDirectPlay8ClientImpl_QueryInterface
(
&
client
->
IDirectPlay8Client_iface
,
riid
,
ppv
);
IDirectPlay8ClientImpl_Release
(
&
client
->
IDirectPlay8Client_iface
);
...
...
dlls/dpnet/dpnet_private.h
View file @
b01fc1aa
...
...
@@ -53,6 +53,8 @@ struct IDirectPlay8ClientImpl
PFNDPNMESSAGEHANDLER
msghandler
;
DWORD
flags
;
void
*
usercontext
;
DPN_SP_CAPS
spcaps
;
};
/* ------------------- */
...
...
dlls/dpnet/tests/client.c
View file @
b01fc1aa
...
...
@@ -36,6 +36,7 @@ static HRESULT WINAPI DirectPlayMessageHandler(PVOID context, DWORD message_id,
static
BOOL
test_init_dp
(
void
)
{
HRESULT
hr
;
DPN_SP_CAPS
caps
;
hr
=
CoInitialize
(
0
);
ok
(
hr
==
S_OK
,
"CoInitialize failed with %x
\n
"
,
hr
);
...
...
@@ -43,6 +44,12 @@ static BOOL test_init_dp(void)
hr
=
CoCreateInstance
(
&
CLSID_DirectPlay8Client
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectPlay8Client
,
(
void
**
)
&
client
);
ok
(
hr
==
S_OK
,
"CoCreateInstance failed with 0x%x
\n
"
,
hr
);
memset
(
&
caps
,
0
,
sizeof
(
DPN_SP_CAPS
));
caps
.
dwSize
=
sizeof
(
DPN_SP_CAPS
);
hr
=
IDirectPlay8Client_GetSPCaps
(
client
,
&
CLSID_DP8SP_TCPIP
,
&
caps
,
0
);
ok
(
hr
==
DPNERR_UNINITIALIZED
,
"GetSPCaps failed with %x
\n
"
,
hr
);
hr
=
IDirectPlay8Client_Initialize
(
client
,
NULL
,
NULL
,
0
);
ok
(
hr
==
DPNERR_INVALIDPARAM
,
"got %x
\n
"
,
hr
);
...
...
@@ -160,24 +167,24 @@ static void test_get_sp_caps(void)
memset
(
&
caps
,
0
,
sizeof
(
DPN_SP_CAPS
));
hr
=
IDirectPlay8Client_GetSPCaps
(
client
,
&
CLSID_DP8SP_TCPIP
,
&
caps
,
0
);
todo_wine
ok
(
hr
==
DPNERR_INVALIDPARAM
,
"GetSPCaps unexpectedly returned %x
\n
"
,
hr
);
ok
(
hr
==
DPNERR_INVALIDPARAM
,
"GetSPCaps unexpectedly returned %x
\n
"
,
hr
);
caps
.
dwSize
=
sizeof
(
DPN_SP_CAPS
);
hr
=
IDirectPlay8Client_GetSPCaps
(
client
,
&
CLSID_DP8SP_TCPIP
,
&
caps
,
0
);
ok
(
hr
==
DPN_OK
,
"GetSPCaps failed with %x
\n
"
,
hr
);
todo_wine
ok
((
caps
.
dwFlags
&
ok
((
caps
.
dwFlags
&
(
DPNSPCAPS_SUPPORTSDPNSRV
|
DPNSPCAPS_SUPPORTSBROADCAST
|
DPNSPCAPS_SUPPORTSALLADAPTERS
))
==
(
DPNSPCAPS_SUPPORTSDPNSRV
|
DPNSPCAPS_SUPPORTSBROADCAST
|
DPNSPCAPS_SUPPORTSALLADAPTERS
),
"unexpected flags %x
\n
"
,
caps
.
dwFlags
);
todo_wine
ok
(
caps
.
dwNumThreads
>=
3
,
"got %d
\n
"
,
caps
.
dwNumThreads
);
todo_wine
ok
(
caps
.
dwDefaultEnumCount
==
5
,
"expected 5, got %d
\n
"
,
caps
.
dwDefaultEnumCount
);
todo_wine
ok
(
caps
.
dwDefaultEnumRetryInterval
==
1500
,
"expected 1500, got %d
\n
"
,
caps
.
dwDefaultEnumRetryInterval
);
todo_wine
ok
(
caps
.
dwDefaultEnumTimeout
==
1500
,
"expected 1500, got %d
\n
"
,
caps
.
dwDefaultEnumTimeout
);
todo_wine
ok
(
caps
.
dwMaxEnumPayloadSize
==
983
,
"expected 983, got %d
\n
"
,
caps
.
dwMaxEnumPayloadSize
);
todo_wine
ok
(
caps
.
dwBuffersPerThread
==
1
,
"expected 1, got %d
\n
"
,
caps
.
dwBuffersPerThread
);
todo_wine
ok
(
caps
.
dwSystemBufferSize
==
0x10000
||
broken
(
caps
.
dwSystemBufferSize
==
0x2000
/* before Win8 */
),
ok
(
caps
.
dwNumThreads
>=
3
,
"got %d
\n
"
,
caps
.
dwNumThreads
);
ok
(
caps
.
dwDefaultEnumCount
==
5
,
"expected 5, got %d
\n
"
,
caps
.
dwDefaultEnumCount
);
ok
(
caps
.
dwDefaultEnumRetryInterval
==
1500
,
"expected 1500, got %d
\n
"
,
caps
.
dwDefaultEnumRetryInterval
);
ok
(
caps
.
dwDefaultEnumTimeout
==
1500
,
"expected 1500, got %d
\n
"
,
caps
.
dwDefaultEnumTimeout
);
ok
(
caps
.
dwMaxEnumPayloadSize
==
983
,
"expected 983, got %d
\n
"
,
caps
.
dwMaxEnumPayloadSize
);
ok
(
caps
.
dwBuffersPerThread
==
1
,
"expected 1, got %d
\n
"
,
caps
.
dwBuffersPerThread
);
ok
(
caps
.
dwSystemBufferSize
==
0x10000
||
broken
(
caps
.
dwSystemBufferSize
==
0x2000
/* before Win8 */
),
"expected 0x10000, got 0x%x
\n
"
,
caps
.
dwSystemBufferSize
);
}
...
...
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