vbscript: Added support for DISPATCH_PROPERTYGET in invoke_variant_prop.

This commit is contained in:
Jacek Caban 2012-09-10 10:34:38 +02:00 committed by Alexandre Julliard
parent 73d00515fe
commit 24f4c09bb6
2 changed files with 7 additions and 0 deletions

View File

@ -300,6 +300,12 @@ static void test_disp(IDispatch *disp)
ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v));
ok(V_BOOL(&v), "V_BOOL(v) = %x\n", V_BOOL(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v));
ok(V_BOOL(&v), "V_BOOL(v) = %x\n", V_BOOL(&v));
dp.cArgs = 1;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08x, expected DISP_E_MEMBERNOTFOUND\n", hres);

View File

@ -103,6 +103,7 @@ static HRESULT invoke_variant_prop(VARIANT *v, WORD flags, DISPPARAMS *dp, VARIA
switch(flags) {
case DISPATCH_PROPERTYGET|DISPATCH_METHOD:
case DISPATCH_PROPERTYGET:
if(dp->cArgs) {
WARN("called with arguments\n");
return DISP_E_MEMBERNOTFOUND; /* That's what tests show */