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
bf2b49b4
Commit
bf2b49b4
authored
May 21, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
May 22, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Make proxy_manager_get_remunknown AddRef the return IRemUnknown object.
Fix up the callers to release the returned IRemUnknown object.
parent
5369d4df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
marshal.c
dlls/ole32/marshal.c
+13
-2
No files found.
dlls/ole32/marshal.c
View file @
bf2b49b4
...
...
@@ -283,6 +283,7 @@ static HRESULT WINAPI ClientIdentity_QueryMultipleInterfaces(IMultiQI *iface, UL
{
hr
=
IRemUnknown_RemQueryInterface
(
remunk
,
ipid
,
NORMALEXTREFS
,
nonlocal_mqis
,
iids
,
&
qiresults
);
IRemUnknown_Release
(
remunk
);
if
(
FAILED
(
hr
))
ERR
(
"IRemUnknown_RemQueryInterface failed with error 0x%08x
\n
"
,
hr
);
}
...
...
@@ -409,6 +410,7 @@ static HRESULT WINAPI Proxy_MarshalInterface(
rif
.
cPublicRefs
=
(
mshlflags
==
MSHLFLAGS_TABLESTRONG
)
?
1
:
NORMALEXTREFS
;
rif
.
cPrivateRefs
=
0
;
hr
=
IRemUnknown_RemAddRef
(
remunk
,
1
,
&
rif
,
&
hrref
);
IRemUnknown_Release
(
remunk
);
if
(
hr
==
S_OK
&&
hrref
==
S_OK
)
{
/* table-strong marshaling doesn't give the refs to the
...
...
@@ -467,6 +469,7 @@ static HRESULT WINAPI Proxy_MarshalInterface(
}
else
ERR
(
"IRemUnknown_RemQueryInterface failed with error 0x%08x
\n
"
,
hr
);
IRemUnknown_Release
(
remunk
);
}
}
...
...
@@ -577,6 +580,7 @@ static HRESULT ifproxy_get_public_ref(struct ifproxy * This)
rif
.
cPublicRefs
=
NORMALEXTREFS
;
rif
.
cPrivateRefs
=
0
;
hr
=
IRemUnknown_RemAddRef
(
remunk
,
1
,
&
rif
,
&
hrref
);
IRemUnknown_Release
(
remunk
);
if
(
hr
==
S_OK
&&
hrref
==
S_OK
)
InterlockedExchangeAdd
((
LONG
*
)
&
This
->
refs
,
NORMALEXTREFS
);
else
...
...
@@ -614,6 +618,7 @@ static HRESULT ifproxy_release_public_refs(struct ifproxy * This)
rif
.
cPublicRefs
=
public_refs
;
rif
.
cPrivateRefs
=
0
;
hr
=
IRemUnknown_RemRelease
(
remunk
,
1
,
&
rif
);
IRemUnknown_Release
(
remunk
);
if
(
hr
==
S_OK
)
InterlockedExchangeAdd
((
LONG
*
)
&
This
->
refs
,
-
public_refs
);
else
if
(
hr
==
RPC_E_DISCONNECTED
)
...
...
@@ -967,8 +972,11 @@ static HRESULT proxy_manager_get_remunknown(struct proxy_manager * This, IRemUnk
EnterCriticalSection
(
&
This
->
cs
);
if
(
This
->
remunk
)
{
/* already created - return existing object */
*
remunk
=
This
->
remunk
;
IRemUnknown_AddRef
(
*
remunk
);
}
else
if
(
!
This
->
parent
)
/* disconnected - we can't create IRemUnknown */
hr
=
S_FALSE
;
...
...
@@ -988,9 +996,12 @@ static HRESULT proxy_manager_get_remunknown(struct proxy_manager * This, IRemUnk
/* do the unmarshal */
hr
=
unmarshal_object
(
&
stdobjref
,
This
->
parent
,
This
->
dest_context
,
This
->
dest_context_data
,
&
IID_IRemUnknown
,
&
This
->
oxid_info
,
(
void
**
)
&
This
->
remunk
);
&
This
->
oxid_info
,
(
void
**
)
remunk
);
if
(
hr
==
S_OK
)
*
remunk
=
This
->
remunk
;
{
This
->
remunk
=
*
remunk
;
IRemUnknown_AddRef
(
This
->
remunk
);
}
}
LeaveCriticalSection
(
&
This
->
cs
);
...
...
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