From 8712174c0d82eefb974bac619b3884caf8640e3e Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 4 Nov 2002 22:38:26 +0000 Subject: [PATCH] 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). --- dlls/ole32/marshal.c | 18 ++++++++++++------ dlls/ole32/ole2stubs.c | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index 2256dcc1ca3..4b7c6097e61 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -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; } diff --git a/dlls/ole32/ole2stubs.c b/dlls/ole32/ole2stubs.c index 46989e027cb..79734d32559 100644 --- a/dlls/ole32/ole2stubs.c +++ b/dlls/ole32/ole2stubs.c @@ -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) {