vbscript: Added support for DISPATCH_METHOD flags in invoke_builtin.

This commit is contained in:
Jacek Caban 2011-09-22 14:25:06 +02:00 committed by Alexandre Julliard
parent ed53c40eda
commit f61bd1c5bf
1 changed files with 13 additions and 5 deletions

View File

@ -139,14 +139,15 @@ static HRESULT invoke_builtin(vbdisp_t *This, const builtin_prop_t *prop, WORD f
FIXME("property does not support DISPATCH_PROPERTYGET\n"); FIXME("property does not support DISPATCH_PROPERTYGET\n");
return E_FAIL; return E_FAIL;
} }
/* FALLTHROUGH */ break;
case DISPATCH_PROPERTYGET|DISPATCH_METHOD: case DISPATCH_PROPERTYGET|DISPATCH_METHOD:
if(arg_cnt(dp) < prop->min_args || arg_cnt(dp) > (prop->max_args ? prop->max_args : prop->min_args)) { break;
FIXME("invalid number of arguments\n"); case DISPATCH_METHOD:
if(prop->flags & (BP_GET|BP_GETPUT)) {
FIXME("Call on property\n");
return E_FAIL; return E_FAIL;
} }
break;
return prop->proc(This, dp->rgvarg, dp->cArgs, res);
case DISPATCH_PROPERTYPUT: case DISPATCH_PROPERTYPUT:
if(!(prop->flags & (BP_GET|BP_GETPUT))) { if(!(prop->flags & (BP_GET|BP_GETPUT))) {
FIXME("property does not support DISPATCH_PROPERTYPUT\n"); FIXME("property does not support DISPATCH_PROPERTYPUT\n");
@ -159,6 +160,13 @@ static HRESULT invoke_builtin(vbdisp_t *This, const builtin_prop_t *prop, WORD f
FIXME("unsupported flags %x\n", flags); FIXME("unsupported flags %x\n", flags);
return E_NOTIMPL; return E_NOTIMPL;
} }
if(arg_cnt(dp) < prop->min_args || arg_cnt(dp) > (prop->max_args ? prop->max_args : prop->min_args)) {
FIXME("invalid number of arguments\n");
return E_FAIL;
}
return prop->proc(This, dp->rgvarg, dp->cArgs, res);
} }
static BOOL run_terminator(vbdisp_t *This) static BOOL run_terminator(vbdisp_t *This)