Robert Shearman : rpcrt4: Fill in the IRpcStubBuffer vtables for interfaces that don't

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jan 30 08:04:08 CST 2006


Module: wine
Branch: refs/heads/master
Commit: b670ec83fd8486052a9ed2478217146ea9a3122f
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=b670ec83fd8486052a9ed2478217146ea9a3122f

Author: Robert Shearman <rob at codeweavers.com>
Date:   Mon Jan 30 14:56:07 2006 +0100

rpcrt4: Fill in the IRpcStubBuffer vtables for interfaces that don't
already have them filled in.

---

 dlls/rpcrt4/cpsf.c  |   15 +++++++++++++++
 dlls/rpcrt4/cpsf.h  |    2 ++
 dlls/rpcrt4/cstub.c |   14 ++++++++++++++
 3 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/dlls/rpcrt4/cpsf.c b/dlls/rpcrt4/cpsf.c
index 78ac681..44bb5a9 100644
--- a/dlls/rpcrt4/cpsf.c
+++ b/dlls/rpcrt4/cpsf.c
@@ -137,9 +137,24 @@ HRESULT WINAPI NdrDllGetClassObject(REFC
 
   *ppv = NULL;
   if (!pPSFactoryBuffer->lpVtbl) {
+    const ProxyFileInfo **pProxyFileList2;
     pPSFactoryBuffer->lpVtbl = &CStdPSFactory_Vtbl;
     pPSFactoryBuffer->RefCount = 0;
     pPSFactoryBuffer->pProxyFileList = pProxyFileList;
+    for (pProxyFileList2 = pProxyFileList; *pProxyFileList2; pProxyFileList2++) {
+      int i;
+      for (i = 0; i < (*pProxyFileList2)->TableSize; i++) {
+        /* FIXME: i think that different vtables should be copied for
+         * async interfaces */
+        void * const *pSrcRpcStubVtbl = (void * const *)&CStdStubBuffer_Vtbl;
+        void **pRpcStubVtbl = (void **)&(*pProxyFileList2)->pStubVtblList[i]->Vtbl;
+        int j;
+
+        for (j = 0; j < sizeof(IRpcStubBufferVtbl)/sizeof(void *); j++)
+          if (!pRpcStubVtbl[j])
+            pRpcStubVtbl[j] = pSrcRpcStubVtbl[j];
+      }
+    }
   }
   if (IsEqualGUID(rclsid, pclsid))
     return IPSFactoryBuffer_QueryInterface((LPPSFACTORYBUFFER)pPSFactoryBuffer, iid, ppv);
diff --git a/dlls/rpcrt4/cpsf.h b/dlls/rpcrt4/cpsf.h
index 0c6d067..cf1572b 100644
--- a/dlls/rpcrt4/cpsf.h
+++ b/dlls/rpcrt4/cpsf.h
@@ -42,4 +42,6 @@ HRESULT WINAPI CStdStubBuffer_Construct(
 
 const MIDL_SERVER_INFO *CStdStubBuffer_GetServerInfo(IRpcStubBuffer *iface);
 
+const IRpcStubBufferVtbl CStdStubBuffer_Vtbl;
+
 #endif  /* __WINE_CPSF_H */
diff --git a/dlls/rpcrt4/cstub.c b/dlls/rpcrt4/cstub.c
index a2c62c0..41c0943 100644
--- a/dlls/rpcrt4/cstub.c
+++ b/dlls/rpcrt4/cstub.c
@@ -181,6 +181,20 @@ void WINAPI CStdStubBuffer_DebugServerRe
   TRACE("(%p)->DebugServerRelease(%p)\n",This,pv);
 }
 
+const IRpcStubBufferVtbl CStdStubBuffer_Vtbl =
+{
+    CStdStubBuffer_QueryInterface,
+    CStdStubBuffer_AddRef,
+    NULL,
+    CStdStubBuffer_Connect,
+    CStdStubBuffer_Disconnect,
+    CStdStubBuffer_Invoke,
+    CStdStubBuffer_IsIIDSupported,
+    CStdStubBuffer_CountRefs,
+    CStdStubBuffer_DebugServerQueryInterface,
+    CStdStubBuffer_DebugServerRelease
+};
+
 const MIDL_SERVER_INFO *CStdStubBuffer_GetServerInfo(IRpcStubBuffer *iface)
 {
   CStdStubBuffer *This = (CStdStubBuffer *)iface;




More information about the wine-cvs mailing list