diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index a045f3d999d..6baa5de4ad8 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -543,6 +543,56 @@ release_marshal: return hres; } +/*********************************************************************** + * CoReleaseMarshalData [OLE32.@] + */ +HRESULT WINAPI +CoReleaseMarshalData(IStream *pStm) { + HRESULT hres; + wine_marshal_id mid; + wine_marshal_data md; + ULONG res; + LPMARSHAL pMarshal; + LPUNKNOWN pUnk; + CLSID xclsid; + + TRACE("(%p)\n",pStm); + + hres = IStream_Read(pStm,&mid,sizeof(mid),&res); + if (hres) { + FIXME("Stream read 1 failed, %lx, (%ld of %d)\n",hres,res,sizeof(mid)); + return hres; + } + hres = IStream_Read(pStm,&md,sizeof(md),&res); + if (hres) { + FIXME("Stream read 2 failed, %lx, (%ld of %d)\n",hres,res,sizeof(md)); + return hres; + } + hres = IStream_Read(pStm,&xclsid,sizeof(xclsid),&res); + if (hres) { + FIXME("Stream read 3 failed, %lx, (%ld of %d)\n",hres,res,sizeof(xclsid)); + return hres; + } + hres=CoCreateInstance(&xclsid,NULL,CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER,&IID_IMarshal,(void**)(char*)&pUnk); + if (hres) { + FIXME("Failed to create instance of unmarshaller %s.\n",debugstr_guid(&xclsid)); + return hres; + } + hres = IUnknown_QueryInterface(pUnk,&IID_IMarshal,(LPVOID*)(char*)&pMarshal); + if (hres) { + FIXME("Failed to get IMarshal iface, %lx?\n",hres); + return hres; + } + hres = IMarshal_ReleaseMarshalData(pMarshal,pStm); + if (hres) { + FIXME("Failed to releasemarshaldata the interface, %lx?\n",hres); + } + IMarshal_Release(pMarshal); + IUnknown_Release(pUnk); + return hres; +} + + /*********************************************************************** * CoMarshalInterThreadInterfaceInStream [OLE32.@] * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 075914a75bb..7f9d6b5fd5b 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -57,7 +57,7 @@ @ stdcall CoRegisterMessageFilter(ptr ptr) @ stub CoRegisterPSClsid #@ stdcall (ptr ptr) return 0,ERR_NOTIMPLEMENTED @ stub CoRegisterSurrogate -@ stub CoReleaseMarshalData #@ stdcall (ptr) return 0,ERR_NOTIMPLEMENTED +@ stdcall CoReleaseMarshalData(ptr) @ stub CoReleaseServerProcess #@ stdcall () return 0,ERR_NOTIMPLEMENTED @ stdcall CoResumeClassObjects() @ stub CoRevertToSelf #@ stdcall () return 0,ERR_NOTIMPLEMENTED