Alexandre Julliard : rpcrt4: Retrieve the stubless information for the thunks directly from the virtual table pointer .
Alexandre Julliard
julliard at winehq.org
Tue Jun 2 08:44:30 CDT 2009
Module: wine
Branch: master
Commit: 449a82866dcfaca83d469838e3b15e3838186671
URL: http://source.winehq.org/git/wine.git/?a=commit;h=449a82866dcfaca83d469838e3b15e3838186671
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jun 1 21:32:56 2009 +0200
rpcrt4: Retrieve the stubless information for the thunks directly from the virtual table pointer.
---
dlls/rpcrt4/cproxy.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c
index 9854e81..887de87 100644
--- a/dlls/rpcrt4/cproxy.c
+++ b/dlls/rpcrt4/cproxy.c
@@ -46,7 +46,6 @@ typedef struct {
const IRpcProxyBufferVtbl *lpVtbl;
LPVOID *PVtbl;
LONG RefCount;
- const MIDL_STUBLESS_PROXY_INFO *stubless;
const IID* piid;
LPUNKNOWN pUnkOuter;
PCInterfaceName name;
@@ -83,11 +82,9 @@ __ASM_GLOBAL_FUNC(call_stubless_func,
HRESULT WINAPI ObjectStubless(DWORD *args)
{
DWORD index = args[0];
- LPVOID iface = (LPVOID)args[2];
-
- ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface);
-
- const MIDL_STUBLESS_PROXY_INFO *stubless = This->stubless;
+ void **iface = (void **)args[2];
+ const void **vtbl = (const void **)*iface;
+ const MIDL_STUBLESS_PROXY_INFO *stubless = *(const MIDL_STUBLESS_PROXY_INFO **)(vtbl - 2);
const PFORMAT_STRING fs = stubless->ProcFormatString + stubless->FormatStringOffset[index];
/* store bytes to remove from stack */
@@ -162,7 +159,6 @@ HRESULT StdProxy_Construct(REFIID riid,
LPVOID *ppvObj)
{
StdProxyImpl *This;
- const MIDL_STUBLESS_PROXY_INFO *stubless = NULL;
PCInterfaceName name = ProxyInfo->pNamesArray[Index];
CInterfaceProxyVtbl *vtbl = ProxyInfo->pProxyVtblList[Index];
@@ -171,9 +167,8 @@ HRESULT StdProxy_Construct(REFIID riid,
/* TableVersion = 2 means it is the stubless version of CInterfaceProxyVtbl */
if (ProxyInfo->TableVersion > 1) {
ULONG count = ProxyInfo->pStubVtblList[Index]->header.DispatchTableCount;
- stubless = *(const void **)vtbl;
vtbl = (CInterfaceProxyVtbl *)((const void **)vtbl + 1);
- TRACE("stubless %p vtbl %p: count=%d\n", stubless, vtbl->Vtbl, count );
+ TRACE("stubless vtbl %p: count=%d\n", vtbl->Vtbl, count );
fill_stubless_table( (IUnknownVtbl *)vtbl->Vtbl, count );
}
@@ -192,7 +187,6 @@ HRESULT StdProxy_Construct(REFIID riid,
This->PVtbl = vtbl->Vtbl;
/* one reference for the proxy */
This->RefCount = 1;
- This->stubless = stubless;
This->piid = vtbl->header.piid;
This->pUnkOuter = pUnkOuter;
This->name = name;
More information about the wine-cvs
mailing list