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
ada61620
Commit
ada61620
authored
Aug 29, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Sep 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Make the reference counting in the standard proxy thread-safe.
parent
3e01da18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
cproxy.c
dlls/rpcrt4/cproxy.c
+8
-8
No files found.
dlls/rpcrt4/cproxy.c
View file @
ada61620
...
...
@@ -44,7 +44,7 @@ struct StublessThunk;
typedef
struct
{
const
IRpcProxyBufferVtbl
*
lpVtbl
;
LPVOID
*
PVtbl
;
DWORD
RefCount
;
LONG
RefCount
;
const
MIDL_STUBLESS_PROXY_INFO
*
stubless
;
const
IID
*
piid
;
LPUNKNOWN
pUnkOuter
;
...
...
@@ -222,13 +222,13 @@ static HRESULT WINAPI StdProxy_QueryInterface(LPRPCPROXYBUFFER iface,
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
IsEqualGUID
(
This
->
piid
,
riid
))
{
*
obj
=
&
This
->
PVtbl
;
This
->
RefCount
++
;
InterlockedIncrement
(
&
This
->
RefCount
)
;
return
S_OK
;
}
if
(
IsEqualGUID
(
&
IID_IRpcProxyBuffer
,
riid
))
{
*
obj
=
&
This
->
lpVtbl
;
This
->
RefCount
++
;
InterlockedIncrement
(
&
This
->
RefCount
)
;
return
S_OK
;
}
...
...
@@ -240,19 +240,19 @@ static ULONG WINAPI StdProxy_AddRef(LPRPCPROXYBUFFER iface)
ICOM_THIS_MULTI
(
StdProxyImpl
,
lpVtbl
,
iface
);
TRACE
(
"(%p)->AddRef()
\n
"
,
This
);
return
++
(
This
->
RefCount
);
return
InterlockedIncrement
(
&
This
->
RefCount
);
}
static
ULONG
WINAPI
StdProxy_Release
(
LPRPCPROXYBUFFER
iface
)
{
ULONG
refs
;
ICOM_THIS_MULTI
(
StdProxyImpl
,
lpVtbl
,
iface
);
TRACE
(
"(%p)->Release()
\n
"
,
This
);
if
(
!--
(
This
->
RefCount
))
{
refs
=
InterlockedDecrement
(
&
This
->
RefCount
);
if
(
!
refs
)
StdProxy_Destruct
((
LPRPCPROXYBUFFER
)
&
This
->
lpVtbl
);
return
0
;
}
return
This
->
RefCount
;
return
refs
;
}
static
HRESULT
WINAPI
StdProxy_Connect
(
LPRPCPROXYBUFFER
iface
,
...
...
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