PATCH: CoReleaseMarshalData

Marcus Meissner marcus at jet.franken.de
Sat May 1 07:59:14 CDT 2004


Hi,

Some program called that function, left over in my tree.

Ciao, Marcus

Changelog:
	Implemented CoReleaseMarshalData.

Index: marshal.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/marshal.c,v
retrieving revision 1.13
diff -u -r1.13 marshal.c
--- dlls/ole32/marshal.c	30 Apr 2004 18:32:36 -0000	1.13
+++ dlls/ole32/marshal.c	1 May 2004 12:57:31 -0000
@@ -542,6 +542,56 @@
   IMarshal_Release(pMarshal);
   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.@]
Index: ole32.spec
===================================================================
RCS file: /home/wine/wine/dlls/ole32/ole32.spec,v
retrieving revision 1.53
diff -u -r1.53 ole32.spec
--- dlls/ole32/ole32.spec	30 Apr 2004 18:32:20 -0000	1.53
+++ dlls/ole32/ole32.spec	1 May 2004 12:57:31 -0000
@@ -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
-- 



More information about the wine-patches mailing list