IUnknown isn't a remotable interface so the stub manager shouldn't
need a marshaller for it.
This commit is contained in:
parent
0c5118144a
commit
037bdc0dc0
|
@ -90,14 +90,19 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
|
|||
struct stub_manager *manager;
|
||||
struct ifstub *ifstub;
|
||||
BOOL tablemarshal;
|
||||
IRpcStubBuffer *stub;
|
||||
IPSFactoryBuffer *psfb;
|
||||
IRpcStubBuffer *stub = NULL;
|
||||
HRESULT hr;
|
||||
|
||||
hr = apartment_getoxid(apt, &stdobjref->oxid);
|
||||
if (hr != S_OK)
|
||||
return hr;
|
||||
|
||||
/* IUnknown doesn't require a stub buffer, because it never goes out on
|
||||
* the wire */
|
||||
if (!IsEqualIID(riid, &IID_IUnknown))
|
||||
{
|
||||
IPSFactoryBuffer *psfb;
|
||||
|
||||
hr = get_facbuf_for_iid(riid, &psfb);
|
||||
if (hr != S_OK)
|
||||
{
|
||||
|
@ -112,6 +117,9 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
|
|||
ERR("Failed to create an IRpcStubBuffer from IPSFactory for %s\n", debugstr_guid(riid));
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
else /* need to addref object anyway */
|
||||
IUnknown_AddRef(obj);
|
||||
|
||||
if (mshlflags & MSHLFLAGS_NOPING)
|
||||
stdobjref->flags = SORF_NOPING;
|
||||
|
@ -129,7 +137,7 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
|
|||
manager = new_stub_manager(apt, obj, mshlflags);
|
||||
if (!manager)
|
||||
{
|
||||
IRpcStubBuffer_Release(stub);
|
||||
if (stub) IRpcStubBuffer_Release(stub);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -409,7 +409,7 @@ struct ifstub *stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer *s
|
|||
if (!stub) return NULL;
|
||||
|
||||
stub->stubbuffer = sb;
|
||||
IUnknown_AddRef(sb);
|
||||
if (sb) IRpcStubBuffer_AddRef(sb);
|
||||
|
||||
/* no need to ref this, same object as sb */
|
||||
stub->iface = iptr;
|
||||
|
@ -446,7 +446,7 @@ static void stub_manager_delete_ifstub(struct stub_manager *m, struct ifstub *if
|
|||
|
||||
RPC_UnregisterInterface(&ifstub->iid);
|
||||
|
||||
IUnknown_Release(ifstub->stubbuffer);
|
||||
if (ifstub->stubbuffer) IUnknown_Release(ifstub->stubbuffer);
|
||||
IUnknown_Release(ifstub->iface);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, ifstub);
|
||||
|
|
Loading…
Reference in New Issue