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
658a5f45
Commit
658a5f45
authored
Jan 20, 2014
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: Store information when Initialize is called.
parent
9b683294
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
peer.c
dlls/dpnet/peer.c
+16
-0
peer.c
dlls/dpnet/tests/peer.c
+3
-0
No files found.
dlls/dpnet/peer.c
View file @
658a5f45
...
...
@@ -43,6 +43,10 @@ typedef struct IDirectPlay8PeerImpl
{
IDirectPlay8Peer
IDirectPlay8Peer_iface
;
LONG
ref
;
PFNDPNMESSAGEHANDLER
msghandler
;
DWORD
flags
;
void
*
usercontext
;
}
IDirectPlay8PeerImpl
;
static
inline
IDirectPlay8PeerImpl
*
impl_from_IDirectPlay8Peer
(
IDirectPlay8Peer
*
iface
)
...
...
@@ -96,8 +100,17 @@ static ULONG WINAPI IDirectPlay8PeerImpl_Release(IDirectPlay8Peer *iface)
static
HRESULT
WINAPI
IDirectPlay8PeerImpl_Initialize
(
IDirectPlay8Peer
*
iface
,
void
*
const
pvUserContext
,
const
PFNDPNMESSAGEHANDLER
pfn
,
const
DWORD
dwFlags
)
{
IDirectPlay8PeerImpl
*
This
=
impl_from_IDirectPlay8Peer
(
iface
);
TRACE
(
"(%p)->(%p,%p,%x): stub
\n
"
,
iface
,
pvUserContext
,
pfn
,
dwFlags
);
if
(
!
pfn
)
return
DPNERR_INVALIDPARAM
;
This
->
usercontext
=
pvUserContext
;
This
->
msghandler
=
pfn
;
This
->
flags
=
dwFlags
;
return
DPN_OK
;
}
...
...
@@ -502,6 +515,9 @@ HRESULT DPNET_CreateDirectPlay8Peer(IClassFactory *iface, IUnknown *pUnkOuter, R
Client
->
IDirectPlay8Peer_iface
.
lpVtbl
=
&
DirectPlay8Peer_Vtbl
;
Client
->
ref
=
1
;
Client
->
usercontext
=
NULL
;
Client
->
msghandler
=
NULL
;
Client
->
flags
=
0
;
ret
=
IDirectPlay8Peer_QueryInterface
(
&
Client
->
IDirectPlay8Peer_iface
,
riid
,
ppobj
);
IDirectPlay8Peer_Release
(
&
Client
->
IDirectPlay8Peer_iface
);
...
...
dlls/dpnet/tests/peer.c
View file @
658a5f45
...
...
@@ -51,6 +51,9 @@ static void test_init_dp(void)
hr
=
CoCreateInstance
(
&
CLSID_DirectPlay8Peer
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectPlay8Peer
,
(
void
**
)
&
peer
);
ok
(
hr
==
S_OK
,
"CoCreateInstance failed with 0x%x
\n
"
,
hr
);
hr
=
IDirectPlay8Peer_Initialize
(
peer
,
NULL
,
NULL
,
0
);
ok
(
hr
==
DPNERR_INVALIDPARAM
,
"got %x
\n
"
,
hr
);
hr
=
IDirectPlay8Peer_Initialize
(
peer
,
NULL
,
DirectPlayMessageHandler
,
0
);
ok
(
hr
==
S_OK
,
"IDirectPlay8Peer_Initialize failed with %x
\n
"
,
hr
);
}
...
...
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