ole32: Implement table-weak marshaling for the free-threaded marshaler.

This commit is contained in:
Robert Shearman 2006-05-24 23:01:53 +01:00 committed by Alexandre Julliard
parent b795631daa
commit f9b5280dd0
2 changed files with 7 additions and 2 deletions

View File

@ -191,6 +191,10 @@ FTMarshalImpl_MarshalInterface (LPMARSHAL iface, IStream * pStm, REFIID riid, vo
if (FAILED(hres))
return hres;
/* don't hold a reference to table-weak marshaled interfaces */
if (mshlflags & MSHLFLAGS_TABLEWEAK)
IUnknown_Release((IUnknown *)object);
hres = IStream_Write (pStm, &mshlflags, sizeof (mshlflags), NULL);
if (hres != S_OK) return STG_E_MEDIUMFULL;
@ -258,7 +262,8 @@ FTMarshalImpl_UnmarshalInterface (LPMARSHAL iface, IStream * pStm, REFIID riid,
if (hres != S_OK) return STG_E_READFAULT;
hres = IUnknown_QueryInterface(object, riid, ppv);
IUnknown_Release(object);
if (!(mshlflags & MSHLFLAGS_TABLEWEAK))
IUnknown_Release(object);
return hres;
}
}

View File

@ -1734,7 +1734,7 @@ static void test_freethreadedmarshaler(void)
MSHLFLAGS_TABLEWEAK);
ok_ole_success(hr, IMarshal_MarshalInterface);
todo_wine ok_no_locks();
ok_no_locks();
test_freethreadedmarshaldata(pStream, MSHCTX_INPROC, &Test_ClassFactory, MSHLFLAGS_TABLEWEAK);