Module: wine Branch: refs/heads/master Commit: 585763ffa91ba10291e2a2eff27b7dd8fd623611 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=585763ffa91ba10291e2a2ef...
Author: James Hawkins truiken@gmail.com Date: Mon Jun 5 17:48:15 2006 -0500
oleaut32: Only BYREF DispCallFunc args whose input args are not BYREF should be changed.
---
dlls/oleaut32/typelib.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index c4b2f56..21c69a9 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5360,9 +5360,11 @@ static HRESULT WINAPI ITypeInfo_fnInvoke { if (wParamFlags & PARAMFLAG_FOUT) { - hres = VariantChangeType(&pDispParams->rgvarg[pDispParams->cArgs - 1 - i], - &rgvarg[i], 0, - V_VT(&pDispParams->rgvarg[pDispParams->cArgs - 1 - i])); + VARIANTARG *arg = &pDispParams->rgvarg[pDispParams->cArgs - 1 - i]; + + if ((rgvt[i] == VT_BYREF) && (V_VT(arg) != VT_BYREF)) + hres = VariantChangeType(arg, &rgvarg[i], 0, V_VT(arg)); + if (FAILED(hres)) { ERR("failed to convert param %d to vt %d\n", i,