fixed com_invoke retval

This commit is contained in:
Harald Radi 2001-08-14 13:38:36 +00:00
parent 4e89fa671e
commit ed126f68d5
2 changed files with 4 additions and 4 deletions

View file

@ -109,6 +109,7 @@ PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DIS
EXCEPINFO ExceptInfo;
*ErrString = NULL;
/* @todo use DispInvoke here ? */
if (C_ISREFD(obj)) {
if (C_HASTLIB(obj)) {
hr = C_TYPEINFO_VT(obj)->Invoke(C_TYPEINFO(obj), C_DISPATCH(obj), dispIdMember, wFlags, pDispParams, pVarResult, &ExceptInfo, &ArgErr);
@ -153,8 +154,7 @@ PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DIS
}
}
if (!pVarResult) {
VariantInit(pVarResult);
if (pVarResult && (V_VT(pVarResult) == VT_EMPTY)) {
V_VT(pVarResult) = VT_I4;
V_I4(pVarResult) = hr;
}

View file

@ -109,6 +109,7 @@ PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DIS
EXCEPINFO ExceptInfo;
*ErrString = NULL;
/* @todo use DispInvoke here ? */
if (C_ISREFD(obj)) {
if (C_HASTLIB(obj)) {
hr = C_TYPEINFO_VT(obj)->Invoke(C_TYPEINFO(obj), C_DISPATCH(obj), dispIdMember, wFlags, pDispParams, pVarResult, &ExceptInfo, &ArgErr);
@ -153,8 +154,7 @@ PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DIS
}
}
if (!pVarResult) {
VariantInit(pVarResult);
if (pVarResult && (V_VT(pVarResult) == VT_EMPTY)) {
V_VT(pVarResult) = VT_I4;
V_I4(pVarResult) = hr;
}