Handle errors in std marshaller better, do not crash.

Added another error message if some program tries to marshal
IOleObject.
OleCreate() should be able to use Local Servers too (it can't as of
now, just for debugging).
This commit is contained in:
Marcus Meissner 2002-11-04 22:38:26 +00:00 committed by Alexandre Julliard
parent 0f53dbf32b
commit 8712174c0d
2 changed files with 13 additions and 7 deletions

View File

@ -316,12 +316,14 @@ StdMarshalImpl_UnmarshalInterface(
return hres;
}
hres = PIPE_GetNewPipeBuf(&mid,&chanbuf);
if (hres)
FIXME("Failed to get an rpc channel buffer for %s\n",debugstr_guid(riid));
IRpcProxyBuffer_Connect(rpcproxy,chanbuf);
IRpcProxyBuffer_Release(rpcproxy); /* no need */
if (hres) {
ERR("Failed to get an rpc channel buffer for %s\n",debugstr_guid(riid));
} else {
IRpcProxyBuffer_Connect(rpcproxy,chanbuf);
IRpcProxyBuffer_Release(rpcproxy); /* no need */
}
IPSFactoryBuffer_Release(psfacbuf);
return S_OK;
return hres;
}
HRESULT WINAPI
@ -477,7 +479,11 @@ CoMarshalInterface( IStream *pStm, REFIID riid, IUnknown *pUnk,
MESSAGE("\nERROR: You need to merge the 'winedefault.reg' file into your\n");
MESSAGE(" Wine registry by running: `regedit winedefault.reg'\n\n");
} else {
FIXME("Failed to Marshal the interface, %lx?\n",hres);
if (IsEqualGUID(riid,&IID_IOleObject)) {
ERR("WINE currently cannot marshal IOleObject interfaces. This means you cannot embed/link OLE objects between applications.\n");
} else {
FIXME("Failed to marshal the interface %s, %lx?\n",debugstr_guid(riid),hres);
}
}
goto release_marshal;
}

View File

@ -97,7 +97,7 @@ HRESULT WINAPI OleCreate(
FIXME("\n\t%s\n\t%s stub!\n", debugstr_guid(rclsid), debugstr_guid(riid));
if (SUCCEEDED((hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER, riid, (LPVOID*)&pUnk))))
if (SUCCEEDED((hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER , riid, (LPVOID*)&pUnk))))
{
if (pClientSite)
{