oleaut32: Support for VT_DISPATCH in VarRound.
This commit is contained in:
parent
7f84b91bff
commit
38079e0744
|
@ -5045,9 +5045,20 @@ HRESULT WINAPI VarRound(LPVARIANT pVarIn, int deci, LPVARIANT pVarOut)
|
|||
VARIANT varIn;
|
||||
HRESULT hRet = S_OK;
|
||||
float factor;
|
||||
VARIANT temp;
|
||||
|
||||
VariantInit(&temp);
|
||||
|
||||
TRACE("(%p->(%s%s),%d)\n", pVarIn, debugstr_VT(pVarIn), debugstr_VF(pVarIn), deci);
|
||||
|
||||
/* Handle VT_DISPATCH by storing and taking address of returned value */
|
||||
if ((V_VT(pVarIn) & VT_TYPEMASK) == VT_DISPATCH && ((V_VT(pVarIn) & ~VT_TYPEMASK) == 0))
|
||||
{
|
||||
hRet = VARIANT_FetchDispatchValue(pVarIn, &temp);
|
||||
if (FAILED(hRet)) goto VarRound_Exit;
|
||||
pVarIn = &temp;
|
||||
}
|
||||
|
||||
switch (V_VT(pVarIn))
|
||||
{
|
||||
/* cases that fail on windows */
|
||||
|
@ -5138,9 +5149,10 @@ HRESULT WINAPI VarRound(LPVARIANT pVarIn, int deci, LPVARIANT pVarOut)
|
|||
V_VT(pVarIn) & VT_TYPEMASK, deci);
|
||||
hRet = DISP_E_BADVARTYPE;
|
||||
}
|
||||
|
||||
VarRound_Exit:
|
||||
if (FAILED(hRet))
|
||||
V_VT(pVarOut) = VT_EMPTY;
|
||||
VariantClear(&temp);
|
||||
|
||||
TRACE("returning 0x%08x (%s%s),%f\n", hRet, debugstr_VT(pVarOut),
|
||||
debugstr_VF(pVarOut), (V_VT(pVarOut) == VT_R4) ? V_R4(pVarOut) :
|
||||
|
|
Loading…
Reference in New Issue