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
1fd704b3
Commit
1fd704b3
authored
Jan 10, 2014
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: Cleanup IDirectPlay8Peer COM interface.
parent
64b40aeb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
dpnet_private.h
dlls/dpnet/dpnet_private.h
+0
-10
peer.c
dlls/dpnet/peer.c
+19
-5
No files found.
dlls/dpnet/dpnet_private.h
View file @
1fd704b3
...
...
@@ -35,7 +35,6 @@
typedef
struct
IDirectPlay8ClientImpl
IDirectPlay8ClientImpl
;
typedef
struct
IDirectPlay8AddressImpl
IDirectPlay8AddressImpl
;
typedef
struct
IDirectPlay8LobbiedApplicationImpl
IDirectPlay8LobbiedApplicationImpl
;
typedef
struct
IDirectPlay8PeerImpl
IDirectPlay8PeerImpl
;
typedef
struct
IDirectPlay8ThreadPoolImpl
IDirectPlay8ThreadPoolImpl
;
/* ------------------ */
...
...
@@ -78,15 +77,6 @@ struct IDirectPlay8LobbiedApplicationImpl
};
/*****************************************************************************
* IDirectPlay8Peer implementation structure
*/
struct
IDirectPlay8PeerImpl
{
IDirectPlay8Peer
IDirectPlay8Peer_iface
;
LONG
ref
;
};
/*****************************************************************************
* IDirectPlay8ThreadPool implementation structure
*/
struct
IDirectPlay8ThreadPoolImpl
...
...
dlls/dpnet/peer.c
View file @
1fd704b3
...
...
@@ -38,6 +38,13 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dpnet
);
typedef
struct
IDirectPlay8PeerImpl
{
IDirectPlay8Peer
IDirectPlay8Peer_iface
;
LONG
ref
;
}
IDirectPlay8PeerImpl
;
static
inline
IDirectPlay8PeerImpl
*
impl_from_IDirectPlay8Peer
(
IDirectPlay8Peer
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectPlay8PeerImpl
,
IDirectPlay8Peer_iface
);
...
...
@@ -66,6 +73,8 @@ static ULONG WINAPI IDirectPlay8PeerImpl_AddRef(IDirectPlay8Peer *iface)
IDirectPlay8PeerImpl
*
This
=
impl_from_IDirectPlay8Peer
(
iface
);
ULONG
RefCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
RefCount
);
return
RefCount
;
}
...
...
@@ -74,6 +83,8 @@ static ULONG WINAPI IDirectPlay8PeerImpl_Release(IDirectPlay8Peer *iface)
IDirectPlay8PeerImpl
*
This
=
impl_from_IDirectPlay8Peer
(
iface
);
ULONG
RefCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
RefCount
);
if
(
!
RefCount
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -474,23 +485,26 @@ static const IDirectPlay8PeerVtbl DirectPlay8Peer_Vtbl =
IDirectPlay8PeerImpl_TerminateSession
};
HRESULT
DPNET_CreateDirectPlay8Peer
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
punkOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
HRESULT
DPNET_CreateDirectPlay8Peer
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IDirectPlay8PeerImpl
*
Client
;
HRESULT
ret
;
Client
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectPlay8PeerImpl
));
*
ppobj
=
NULL
;
if
(
Client
==
NULL
)
{
*
ppobj
=
NULL
;
WARN
(
"Not enough memory
\n
"
);
return
E_OUTOFMEMORY
;
}
Client
->
IDirectPlay8Peer_iface
.
lpVtbl
=
&
DirectPlay8Peer_Vtbl
;
ret
=
IDirectPlay8PeerImpl_QueryInterface
(
&
Client
->
IDirectPlay8Peer_iface
,
riid
,
ppobj
);
if
(
ret
!=
DPN_OK
)
HeapFree
(
GetProcessHeap
(),
0
,
Client
);
Client
->
ref
=
1
;
ret
=
IDirectPlay8Peer_QueryInterface
(
&
Client
->
IDirectPlay8Peer_iface
,
riid
,
ppobj
);
IDirectPlay8Peer_Release
(
&
Client
->
IDirectPlay8Peer_iface
);
return
ret
;
}
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