mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
ole32: Fix CoLockObjectExternal to respect fLastUnlockReleases.
This commit is contained in:
parent
ab378803ef
commit
6455b9e1a0
4 changed files with 7 additions and 7 deletions
|
@ -2234,7 +2234,7 @@ HRESULT WINAPI CoLockObjectExternal(
|
|||
if (fLock)
|
||||
stub_manager_ext_addref(stubmgr, 1);
|
||||
else
|
||||
stub_manager_ext_release(stubmgr, 1);
|
||||
stub_manager_ext_release(stubmgr, 1, fLastUnlockReleases);
|
||||
|
||||
stub_manager_int_release(stubmgr);
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ ULONG stub_manager_int_addref(struct stub_manager *This);
|
|||
ULONG stub_manager_int_release(struct stub_manager *This);
|
||||
struct stub_manager *new_stub_manager(APARTMENT *apt, IUnknown *object);
|
||||
ULONG stub_manager_ext_addref(struct stub_manager *m, ULONG refs);
|
||||
ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs);
|
||||
ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL last_unlock_releases);
|
||||
struct ifstub *stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer *sb, IUnknown *iptr, REFIID iid, MSHLFLAGS flags);
|
||||
struct ifstub *stub_manager_find_ifstub(struct stub_manager *m, REFIID iid, MSHLFLAGS flags);
|
||||
struct stub_manager *get_stub_manager(APARTMENT *apt, OID oid);
|
||||
|
|
|
@ -1190,7 +1190,7 @@ StdMarshalImpl_UnmarshalInterface(LPMARSHAL iface, IStream *pStm, REFIID riid, v
|
|||
|
||||
/* unref the ifstub. FIXME: only do this on success? */
|
||||
if (!stub_manager_is_table_marshaled(stubmgr, &stdobjref.ipid))
|
||||
stub_manager_ext_release(stubmgr, stdobjref.cPublicRefs);
|
||||
stub_manager_ext_release(stubmgr, stdobjref.cPublicRefs, TRUE);
|
||||
|
||||
stub_manager_int_release(stubmgr);
|
||||
return hres;
|
||||
|
|
|
@ -253,7 +253,7 @@ ULONG stub_manager_ext_addref(struct stub_manager *m, ULONG refs)
|
|||
}
|
||||
|
||||
/* remove some external references */
|
||||
ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs)
|
||||
ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL last_unlock_releases)
|
||||
{
|
||||
ULONG rc;
|
||||
|
||||
|
@ -267,7 +267,7 @@ ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs)
|
|||
|
||||
TRACE("removed %lu refs from %p (oid %s), rc is now %lu\n", refs, m, wine_dbgstr_longlong(m->oid), rc);
|
||||
|
||||
if (rc == 0)
|
||||
if (rc == 0 && last_unlock_releases)
|
||||
stub_manager_int_release(m);
|
||||
|
||||
return rc;
|
||||
|
@ -537,7 +537,7 @@ void stub_manager_release_marshal_data(struct stub_manager *m, ULONG refs, const
|
|||
else if (ifstub->flags & MSHLFLAGS_TABLESTRONG)
|
||||
refs = 1;
|
||||
|
||||
stub_manager_ext_release(m, refs);
|
||||
stub_manager_ext_release(m, refs, TRUE);
|
||||
}
|
||||
|
||||
/* is an ifstub table marshaled? */
|
||||
|
@ -717,7 +717,7 @@ static HRESULT WINAPI RemUnknown_RemRelease(IRemUnknown *iface,
|
|||
break;
|
||||
}
|
||||
|
||||
stub_manager_ext_release(stubmgr, InterfaceRefs[i].cPublicRefs);
|
||||
stub_manager_ext_release(stubmgr, InterfaceRefs[i].cPublicRefs, TRUE);
|
||||
if (InterfaceRefs[i].cPrivateRefs)
|
||||
FIXME("Releasing %ld refs securely not implemented\n", InterfaceRefs[i].cPrivateRefs);
|
||||
|
||||
|
|
Loading…
Reference in a new issue