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
91414e8e
Commit
91414e8e
authored
Apr 11, 2014
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Apr 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: Cleanup IDirectPlay8Address.
parent
7bdbb8c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
19 deletions
+26
-19
address.c
dlls/dpnet/address.c
+26
-19
No files found.
dlls/dpnet/address.c
View file @
91414e8e
...
...
@@ -58,24 +58,24 @@ static HRESULT WINAPI IDirectPlay8AddressImpl_QueryInterface(IDirectPlay8Address
static
ULONG
WINAPI
IDirectPlay8AddressImpl_AddRef
(
IDirectPlay8Address
*
iface
)
{
IDirectPlay8AddressImpl
*
This
=
impl_from_IDirectPlay8Address
(
iface
);
ULONG
ref
Count
=
InterlockedIncrement
(
&
This
->
ref
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)
->(ref before=%u)
\n
"
,
This
,
refCount
-
1
);
TRACE
(
"(%p)
ref=%u
\n
"
,
This
,
ref
);
return
ref
Count
;
return
ref
;
}
static
ULONG
WINAPI
IDirectPlay8AddressImpl_Release
(
IDirectPlay8Address
*
iface
)
{
IDirectPlay8AddressImpl
*
This
=
impl_from_IDirectPlay8Address
(
iface
);
ULONG
ref
Count
=
InterlockedDecrement
(
&
This
->
ref
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)
->(ref before=%u)
\n
"
,
This
,
refCount
+
1
);
TRACE
(
"(%p)
ref=%u
\n
"
,
This
,
ref
);
if
(
!
ref
Count
)
{
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
Count
;
return
ref
;
}
/* returns name of given GUID */
...
...
@@ -312,17 +312,24 @@ static const IDirectPlay8AddressVtbl DirectPlay8Address_Vtbl =
IDirectPlay8AddressImpl_BuildFromDirectPlay4Address
};
HRESULT
DPNET_CreateDirectPlay8Address
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
punkOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IDirectPlay8AddressImpl
*
client
;
HRESULT
DPNET_CreateDirectPlay8Address
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IDirectPlay8AddressImpl
*
client
;
HRESULT
ret
;
TRACE
(
"(%p, %s, %p)
\n
"
,
punkOuter
,
debugstr_guid
(
riid
),
ppobj
);
client
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectPlay8AddressImpl
));
if
(
NULL
==
client
)
{
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
client
->
IDirectPlay8Address_iface
.
lpVtbl
=
&
DirectPlay8Address_Vtbl
;
client
->
ref
=
0
;
/* will be inited with QueryInterface */
return
IDirectPlay8AddressImpl_QueryInterface
(
&
client
->
IDirectPlay8Address_iface
,
riid
,
ppobj
);
TRACE
(
"(%p, %s, %p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppobj
);
*
ppobj
=
NULL
;
client
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectPlay8AddressImpl
));
if
(
!
client
)
return
E_OUTOFMEMORY
;
client
->
IDirectPlay8Address_iface
.
lpVtbl
=
&
DirectPlay8Address_Vtbl
;
client
->
ref
=
1
;
ret
=
IDirectPlay8AddressImpl_QueryInterface
(
&
client
->
IDirectPlay8Address_iface
,
riid
,
ppobj
);
IDirectPlay8AddressImpl_Release
(
&
client
->
IDirectPlay8Address_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