Kevin Puetz : oleaut32: FUNC_DISPATCH from dispinterface should have oVft == 0.
Alexandre Julliard
julliard at winehq.org
Mon Sep 28 14:49:25 CDT 2020
Module: wine
Branch: master
Commit: 03b1b3920c666807aab4c143ba8209442d38ccee
URL: https://source.winehq.org/git/wine.git/?a=commit;h=03b1b3920c666807aab4c143ba8209442d38ccee
Author: Kevin Puetz <PuetzKevinA at JohnDeere.com>
Date: Mon Sep 28 10:52:51 2020 +0100
oleaut32: FUNC_DISPATCH from dispinterface should have oVft == 0.
A dispinterface has no vtbl beyond IDispatch itself.
Signed-off-by: Kevin Puetz <PuetzKevinA at JohnDeere.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/oleaut32/typelib.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 06667850a3..540d91f2eb 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -2465,7 +2465,10 @@ MSFT_DoFuncs(TLBContext* pcx,
ptfd->funcdesc.callconv = (pFuncRec->FKCCIC) >> 8 & 0xF;
ptfd->funcdesc.cParams = pFuncRec->nrargs ;
ptfd->funcdesc.cParamsOpt = pFuncRec->nroargs ;
- ptfd->funcdesc.oVft = (pFuncRec->VtableOffset & ~1) * sizeof(void *) / pTI->pTypeLib->ptr_size;
+ if (ptfd->funcdesc.funckind == FUNC_DISPATCH)
+ ptfd->funcdesc.oVft = 0;
+ else
+ ptfd->funcdesc.oVft = (pFuncRec->VtableOffset & ~1) * sizeof(void *) / pTI->pTypeLib->ptr_size;
ptfd->funcdesc.wFuncFlags = LOWORD(pFuncRec->Flags) ;
/* nameoffset is sometimes -1 on the second half of a propget/propput
@@ -4179,7 +4182,10 @@ static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI,
pFuncDesc->funcdesc.callconv = pFunc->nacc & 0x7;
pFuncDesc->funcdesc.cParams = pFunc->nacc >> 3;
pFuncDesc->funcdesc.cParamsOpt = (pFunc->retnextopt & 0x7e) >> 1;
- pFuncDesc->funcdesc.oVft = (pFunc->vtblpos & ~1) * sizeof(void *) / pTI->pTypeLib->ptr_size;
+ if (pFuncDesc->funcdesc.funckind == FUNC_DISPATCH)
+ pFuncDesc->funcdesc.oVft = 0;
+ else
+ pFuncDesc->funcdesc.oVft = (pFunc->vtblpos & ~1) * sizeof(void *) / pTI->pTypeLib->ptr_size;
if(pFunc->magic & SLTG_FUNCTION_FLAGS_PRESENT)
pFuncDesc->funcdesc.wFuncFlags = pFunc->funcflags;
More information about the wine-cvs
mailing list