Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/oleaut32/tests/tmarshal.c | 5 ----- 1 file changed, 5 deletions(-)
diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 4e9a8baeca0..1e75a93ebce 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -30,9 +30,6 @@
#include "tmarshal.h"
-static HRESULT (WINAPI *pVarAdd)(LPVARIANT,LPVARIANT,LPVARIANT); - - #define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) static inline void release_iface_(unsigned int line, void *iface) { @@ -3747,8 +3744,6 @@ static void test_marshal_dispinterface(void) START_TEST(tmarshal) { HRESULT hr; - HANDLE hOleaut32 = GetModuleHandleA("oleaut32.dll"); - pVarAdd = (void*)GetProcAddress(hOleaut32, "VarAdd");
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/oleaut32/tests/tmarshal.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 1e75a93ebce..7c02c4f9bcb 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -1754,17 +1754,15 @@ static inline KindaEnum *impl_from_IKindaEnumWidget(IKindaEnumWidget *iface) static HRESULT register_current_module_typelib(void) { WCHAR path[MAX_PATH]; - CHAR pathA[MAX_PATH]; - HRESULT hr; ITypeLib *typelib; + HRESULT hr;
- GetModuleFileNameA(NULL, pathA, MAX_PATH); - MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); + GetModuleFileNameW(NULL, path, MAX_PATH);
hr = LoadTypeLib(path, &typelib); if (SUCCEEDED(hr)) { - hr = RegisterTypeLib(typelib, path, NULL); + hr = RegisterTypeLibForUser(typelib, path, NULL); ITypeLib_Release(typelib); } return hr; @@ -3762,7 +3760,7 @@ START_TEST(tmarshal) test_external_connection(); test_marshal_dispinterface();
- hr = UnRegisterTypeLib(&LIBID_TestTypelib, 2, 5, LOCALE_NEUTRAL, + hr = UnRegisterTypeLibForUser(&LIBID_TestTypelib, 2, 5, LOCALE_NEUTRAL, sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32); ok_ole_success(hr, UnRegisterTypeLib);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=98229
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 0838:tmarshal: unhandled exception c0000005 at 00000024
=== w7u_el (32 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 0870:tmarshal: unhandled exception c0000005 at 00000024
=== w8 (32 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 0c84:tmarshal: unhandled exception c0000005 at 00000024
=== w864 (32 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 02c8:tmarshal: unhandled exception c0000005 at 00000024
=== w1064v1507 (32 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 0f5c:tmarshal: unhandled exception c0000005 at 00000024
=== w1064v1809 (32 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 1600:tmarshal: unhandled exception c0000005 at 00000024
=== w1064 (32 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 1d64:tmarshal: unhandled exception c0000005 at 00000024
=== w1064_tsign (32 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 1564:tmarshal: unhandled exception c0000005 at 00000024
=== w10pro64 (32 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 0d00:tmarshal: unhandled exception c0000005 at 00000024
=== w864 (64 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 0b2c:tmarshal: unhandled exception c0000005 at 0000000000000048
=== w1064v1507 (64 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 0e68:tmarshal: unhandled exception c0000005 at 0000000000000048
=== w1064v1809 (64 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 18b8:tmarshal: unhandled exception c0000005 at 0000000000000048
=== w1064 (64 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 1c78:tmarshal: unhandled exception c0000005 at 0000000000000048
=== w1064_2qxl (64 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 19b0:tmarshal: unhandled exception c0000005 at 0000000000000048
=== w1064_tsign (64 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 1990:tmarshal: unhandled exception c0000005 at 0000000000000048
=== w10pro64 (64 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 0b34:tmarshal: unhandled exception c0000005 at 0000000000000048
=== w10pro64_ar (64 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 15bc:tmarshal: unhandled exception c0000005 at 0000000000000048
=== w10pro64_he (64 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 1d58:tmarshal: unhandled exception c0000005 at 0000000000000048
=== w10pro64_ja (64 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 1e44:tmarshal: unhandled exception c0000005 at 0000000000000048
=== w10pro64_zh_CN (64 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 1ef4:tmarshal: unhandled exception c0000005 at 0000000000000048
On 9/17/21 2:24 PM, Marvin wrote:
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=98229
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
oleaut32: tmarshal.c:104: Test failed: CoMarshalInterface failed with error 0x80040155 tmarshal.c:2922: Test failed: CoUnmarshalInterface failed with error 0x8003001e tmarshal.c:1778: Test failed: LoadRegTypeLib failed with error 0x8002801d 0838:tmarshal: unhandled exception c0000005 at 00000024
I see. Let's ignore patch 2/6, the rest doesn't depend on it.
It was already available on XP.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/oleaut32/tests/usrmarshal.c | 78 +++++++++----------------------- 1 file changed, 21 insertions(+), 57 deletions(-)
diff --git a/dlls/oleaut32/tests/usrmarshal.c b/dlls/oleaut32/tests/usrmarshal.c index 4fc26f33c63..92d0da3403b 100644 --- a/dlls/oleaut32/tests/usrmarshal.c +++ b/dlls/oleaut32/tests/usrmarshal.c @@ -36,14 +36,12 @@ # define V_U2(A) (*(A)) #endif
-static HRESULT (WINAPI *pSafeArrayGetVartype)(SAFEARRAY*,VARTYPE*); - static inline SF_TYPE get_union_type(SAFEARRAY *psa) { VARTYPE vt; HRESULT hr;
- hr = pSafeArrayGetVartype(psa, &vt); + hr = SafeArrayGetVartype(psa, &vt); if (FAILED(hr)) { if(psa->fFeatures & FADF_VARIANT) return SF_VARIANT; @@ -131,10 +129,7 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa) return; }
- if (!pSafeArrayGetVartype) - return; - - if(FAILED(pSafeArrayGetVartype(lpsa, &vt))) + if(FAILED(SafeArrayGetVartype(lpsa, &vt))) vt = 0;
sftype = get_union_type(lpsa); @@ -266,12 +261,9 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); LPSAFEARRAY_UserUnmarshal(&umcb.Flags, buffer, &lpsa2); ok(lpsa2 != NULL, "LPSAFEARRAY didn't unmarshal\n"); - if (pSafeArrayGetVartype) - { - pSafeArrayGetVartype(lpsa, &vt); - pSafeArrayGetVartype(lpsa2, &vt2); - ok(vt == vt2, "vts differ %x %x\n", vt, vt2); - } + SafeArrayGetVartype(lpsa, &vt); + SafeArrayGetVartype(lpsa2, &vt2); + ok(vt == vt2, "vts differ %x %x\n", vt, vt2); ok(lpsa2->cLocks == 0, "got lock count %u, expected 0\n", lpsa2->cLocks); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2); @@ -313,12 +305,9 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); LPSAFEARRAY_UserUnmarshal(&umcb.Flags, buffer, &lpsa2); ok(lpsa2 != NULL, "LPSAFEARRAY didn't unmarshal\n"); - if (pSafeArrayGetVartype) - { - pSafeArrayGetVartype(lpsa, &vt); - pSafeArrayGetVartype(lpsa2, &vt2); - ok(vt == vt2, "vts differ %x %x\n", vt, vt2); - } + SafeArrayGetVartype(lpsa, &vt); + SafeArrayGetVartype(lpsa2, &vt2); + ok(vt == vt2, "vts differ %x %x\n", vt, vt2); ok(lpsa2->cLocks == 0, "got lock count %u, expected 0\n", lpsa2->cLocks); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2); @@ -387,12 +376,8 @@ static void test_marshal_LPSAFEARRAY(void) lpsa->rgsabound[0].cElements = 48; hr = SafeArrayAllocData(lpsa); ok(hr == S_OK, "saad failed %08x\n", hr); - - if (pSafeArrayGetVartype) - { - hr = pSafeArrayGetVartype(lpsa, &vt); - ok(hr == E_INVALIDARG, "ret %08x\n", hr); - } + hr = SafeArrayGetVartype(lpsa, &vt); + ok(hr == E_INVALIDARG, "ret %08x\n", hr);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); @@ -496,12 +481,8 @@ static void test_marshal_LPSAFEARRAY(void) lpsa->rgsabound[0].cElements = 48; hr = SafeArrayAllocData(lpsa); ok(hr == S_OK, "saad failed %08x\n", hr); - - if (pSafeArrayGetVartype) - { - hr = pSafeArrayGetVartype(lpsa, &vt); - ok(hr == E_INVALIDARG, "ret %08x\n", hr); - } + hr = SafeArrayGetVartype(lpsa, &vt); + ok(hr == E_INVALIDARG, "ret %08x\n", hr);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); @@ -1321,12 +1302,9 @@ static void test_marshal_VARIANT(void) SafeArrayGetUBound(V_ARRAY(&v), 1, &bound); SafeArrayGetUBound(V_ARRAY(&v2), 1, &bound2); ok(bound == bound2, "array ubounds differ\n"); - if (pSafeArrayGetVartype) - { - pSafeArrayGetVartype(V_ARRAY(&v), &vt); - pSafeArrayGetVartype(V_ARRAY(&v2), &vt2); - ok(vt == vt2, "array vts differ %x %x\n", vt, vt2); - } + SafeArrayGetVartype(V_ARRAY(&v), &vt); + SafeArrayGetVartype(V_ARRAY(&v2), &vt2); + ok(vt == vt2, "array vts differ %x %x\n", vt, vt2); VARIANT_UserFree(&umcb.Flags, &v2); HeapFree(GetProcessHeap(), 0, oldbuffer);
@@ -1363,12 +1341,9 @@ static void test_marshal_VARIANT(void) SafeArrayGetUBound(*V_ARRAYREF(&v), 1, &bound); SafeArrayGetUBound(*V_ARRAYREF(&v2), 1, &bound2); ok(bound == bound2, "array ubounds differ\n"); - if (pSafeArrayGetVartype) - { - pSafeArrayGetVartype(*V_ARRAYREF(&v), &vt); - pSafeArrayGetVartype(*V_ARRAYREF(&v2), &vt2); - ok(vt == vt2, "array vts differ %x %x\n", vt, vt2); - } + SafeArrayGetVartype(*V_ARRAYREF(&v), &vt); + SafeArrayGetVartype(*V_ARRAYREF(&v2), &vt2); + ok(vt == vt2, "array vts differ %x %x\n", vt, vt2); VARIANT_UserFree(&umcb.Flags, &v2); HeapFree(GetProcessHeap(), 0, oldbuffer);
@@ -1413,12 +1388,9 @@ static void test_marshal_VARIANT(void) SafeArrayGetUBound(*V_ARRAYREF(&v), 1, &bound); SafeArrayGetUBound(*V_ARRAYREF(&v2), 1, &bound2); ok(bound == bound2, "array ubounds differ\n"); - if (pSafeArrayGetVartype) - { - pSafeArrayGetVartype(*V_ARRAYREF(&v), &vt); - pSafeArrayGetVartype(*V_ARRAYREF(&v2), &vt2); - ok(vt == vt2, "array vts differ %x %x\n", vt, vt2); - } + SafeArrayGetVartype(*V_ARRAYREF(&v), &vt); + SafeArrayGetVartype(*V_ARRAYREF(&v2), &vt2); + ok(vt == vt2, "array vts differ %x %x\n", vt, vt2); lpsa2->fFeatures &= ~FADF_STATIC; hr = SafeArrayDestroy(*V_ARRAYREF(&v2)); ok(hr == S_OK, "got 0x%08x\n", hr); @@ -1608,14 +1580,6 @@ todo_wine
START_TEST(usrmarshal) { - HANDLE hOleaut32 = GetModuleHandleA("oleaut32.dll"); -#define GETPTR(func) p##func = (void*)GetProcAddress(hOleaut32, #func) - GETPTR(SafeArrayGetVartype); -#undef GETPTR - - if (!pSafeArrayGetVartype) - win_skip("SafeArrayGetVartype is not available, some tests will be skipped\n"); - CoInitialize(NULL);
test_marshal_LPSAFEARRAY();
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/oleaut32/typelib.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index ac326afe1a1..fb49cd303fe 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -7273,6 +7273,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( VARIANTARG **prgpvarg = INVBUF_GET_ARG_PTR_ARRAY(buffer, func_desc->cParams); VARIANTARG *rgvarg = INVBUF_GET_ARG_ARRAY(buffer, func_desc->cParams); VARTYPE *rgvt = INVBUF_GET_ARG_TYPE_ARRAY(buffer, func_desc->cParams); + VARIANTARG *missing_arg = INVBUF_GET_MISSING_ARG_ARRAY(buffer, func_desc->cParams); UINT cNamedArgs = pDispParams->cNamedArgs; DISPID *rgdispidNamedArgs = pDispParams->rgdispidNamedArgs; UINT vargs_converted=0; @@ -7387,7 +7388,6 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( V_VARIANTREF(&rgvarg[i]) = V_VARIANTREF(src_arg); else { - VARIANTARG *missing_arg = INVBUF_GET_MISSING_ARG_ARRAY(buffer, func_desc->cParams); if (wParamFlags & PARAMFLAG_FIN) hres = VariantCopy(&missing_arg[i], src_arg); V_VARIANTREF(&rgvarg[i]) = &missing_arg[i]; @@ -7430,7 +7430,6 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( } else if ((rgvt[i] & VT_BYREF) && !V_ISBYREF(src_arg)) { - VARIANTARG *missing_arg = INVBUF_GET_MISSING_ARG_ARRAY(buffer, func_desc->cParams); if (wParamFlags & PARAMFLAG_FIN) hres = VariantChangeType(&missing_arg[i], src_arg, 0, rgvt[i] & ~VT_BYREF); else @@ -7500,20 +7499,22 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( } else { - VARIANTARG *missing_arg; /* if the function wants a pointer to a variant then * set that up, otherwise just pass the VT_ERROR in * the argument by value */ if (rgvt[i] & VT_BYREF) { - missing_arg = INVBUF_GET_MISSING_ARG_ARRAY(buffer, func_desc->cParams) + i; + V_VT(&missing_arg[i]) = VT_ERROR; + V_ERROR(&missing_arg[i]) = DISP_E_PARAMNOTFOUND; + V_VT(arg) = VT_VARIANT | VT_BYREF; - V_VARIANTREF(arg) = missing_arg; + V_VARIANTREF(arg) = &missing_arg[i]; } else - missing_arg = arg; - V_VT(missing_arg) = VT_ERROR; - V_ERROR(missing_arg) = DISP_E_PARAMNOTFOUND; + { + V_VT(arg) = VT_ERROR; + V_ERROR(arg) = DISP_E_PARAMNOTFOUND; + } } } else @@ -7544,7 +7545,6 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( for (i = 0; i < func_desc->cParams; i++) { USHORT wParamFlags = func_desc->lprgelemdescParam[i].u.paramdesc.wParamFlags; - VARIANTARG *missing_arg = INVBUF_GET_MISSING_ARG_ARRAY(buffer, func_desc->cParams);
if (wParamFlags & PARAMFLAG_FLCID) continue;
Whole argument buffer is already zero-initialized.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/oleaut32/typelib.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index fb49cd303fe..5c5aca63538 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -7361,7 +7361,6 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( { VARIANTARG *arg; arg = prgpvarg[i] = &rgvarg[i]; - memset(arg, 0, sizeof(*arg)); V_VT(arg) = rgvt[i]; memset(&retval, 0, sizeof(retval)); V_BYREF(arg) = &retval;
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/oleaut32/typelib.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 5c5aca63538..b2ce1153a8f 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -7269,7 +7269,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( case FUNC_VIRTUAL: { void *buffer = heap_alloc_zero(INVBUF_ELEMENT_SIZE * func_desc->cParams); VARIANT varresult; - VARIANT retval; /* pointer for storing byref retvals in */ + VARIANT retval = { 0 }; /* pointer for storing byref retvals in */ VARIANTARG **prgpvarg = INVBUF_GET_ARG_PTR_ARRAY(buffer, func_desc->cParams); VARIANTARG *rgvarg = INVBUF_GET_ARG_ARRAY(buffer, func_desc->cParams); VARTYPE *rgvt = INVBUF_GET_ARG_TYPE_ARRAY(buffer, func_desc->cParams); @@ -7315,10 +7315,9 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
if (wParamFlags & PARAMFLAG_FLCID) { - VARIANTARG *arg; - arg = prgpvarg[i] = &rgvarg[i]; - V_VT(arg) = VT_I4; - V_I4(arg) = This->pTypeLib->lcid; + prgpvarg[i] = &rgvarg[i]; + V_VT(prgpvarg[i]) = VT_I4; + V_I4(prgpvarg[i]) = This->pTypeLib->lcid; continue; }
@@ -7359,11 +7358,9 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( * native does */ if (i == func_desc->cParams - 1) { - VARIANTARG *arg; - arg = prgpvarg[i] = &rgvarg[i]; - V_VT(arg) = rgvt[i]; - memset(&retval, 0, sizeof(retval)); - V_BYREF(arg) = &retval; + prgpvarg[i] = &rgvarg[i]; + V_BYREF(prgpvarg[i]) = &retval; + V_VT(prgpvarg[i]) = rgvt[i]; } else {