Kevin Puetz : oleaut32: Omit [lcid] parameter when rewriting FUNCDESC to FUNC_DISPATCH.

Alexandre Julliard julliard at winehq.org
Mon Sep 28 14:49:25 CDT 2020


Module: wine
Branch: master
Commit: 269207e6fdfcf89091107e0192cc2304e765a2f3
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=269207e6fdfcf89091107e0192cc2304e765a2f3

Author: Kevin Puetz <PuetzKevinA at JohnDeere.com>
Date:   Mon Sep 28 10:52:53 2020 +0100

oleaut32: Omit [lcid] parameter when rewriting FUNCDESC to FUNC_DISPATCH.

[lcid] parameters are supplied from IDispatch::Invoke's parameters,
rather than via DISPPARAMS::rgvargs[] and should also be removed
from the FUNC_DISPATCH translation.

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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index eaff9be77f..54d020b7e9 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -5887,6 +5887,10 @@ static HRESULT TLB_AllocAndInitFuncDesc( const FUNCDESC *src, FUNCDESC **dest_pt
              * not pVarResult.  So the function signature should show no return value. */
             dest->elemdescFunc.tdesc.vt = VT_VOID;
 
+        /* The now-last (except [retval], removed above) parameter might be labeled [lcid].
+         * If so it will be supplied from Invoke(lcid), so also not via DISPPARAMS::rgvarg */
+        if (dest->cParams && (dest->lprgelemdescParam[dest->cParams - 1].u.paramdesc.wParamFlags & PARAMFLAG_FLCID))
+            dest->cParams--;
     }
 
     *dest_ptr = dest;




More information about the wine-cvs mailing list