mshtml: Added InvokeEx(DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF) implementation.
This commit is contained in:
parent
007b398215
commit
cefb25c74f
|
@ -870,7 +870,15 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
|
||||||
}
|
}
|
||||||
case DISPATCH_PROPERTYGET:
|
case DISPATCH_PROPERTYGET:
|
||||||
return VariantCopy(pvarRes, var);
|
return VariantCopy(pvarRes, var);
|
||||||
|
case DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF:
|
||||||
case DISPATCH_PROPERTYPUT:
|
case DISPATCH_PROPERTYPUT:
|
||||||
|
if(pdp->cArgs != 1 || (pdp->cNamedArgs == 1 && *pdp->rgdispidNamedArgs != DISPID_PROPERTYPUT)
|
||||||
|
|| pdp->cNamedArgs > 1) {
|
||||||
|
FIXME("invalid args\n");
|
||||||
|
return E_INVALIDARG;
|
||||||
|
}
|
||||||
|
|
||||||
|
TRACE("put %s\n", debugstr_variant(pdp->rgvarg));
|
||||||
VariantClear(var);
|
VariantClear(var);
|
||||||
return VariantCopy(var, pdp->rgvarg);
|
return VariantCopy(var, pdp->rgvarg);
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -817,13 +817,13 @@ static HRESULT WINAPI ActiveScriptParse_AddScriptlet(IActiveScriptParse *iface,
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT dispex_propput(IDispatchEx *obj, DISPID id, VARIANT *var)
|
static HRESULT dispex_propput(IDispatchEx *obj, DISPID id, DWORD flags, VARIANT *var)
|
||||||
{
|
{
|
||||||
DISPID propput_arg = DISPID_PROPERTYPUT;
|
DISPID propput_arg = DISPID_PROPERTYPUT;
|
||||||
DISPPARAMS dp = {var, &propput_arg, 1, 1};
|
DISPPARAMS dp = {var, &propput_arg, 1, 1};
|
||||||
EXCEPINFO ei = {0};
|
EXCEPINFO ei = {0};
|
||||||
|
|
||||||
return IDispatchEx_InvokeEx(obj, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dp, NULL, &ei, NULL);
|
return IDispatchEx_InvokeEx(obj, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT|flags, &dp, NULL, &ei, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_func(IDispatchEx *obj)
|
static void test_func(IDispatchEx *obj)
|
||||||
|
@ -871,7 +871,7 @@ static void test_func(IDispatchEx *obj)
|
||||||
|
|
||||||
V_VT(&var) = VT_I4;
|
V_VT(&var) = VT_I4;
|
||||||
V_I4(&var) = 100;
|
V_I4(&var) = 100;
|
||||||
hres = dispex_propput(obj, id, &var);
|
hres = dispex_propput(obj, id, 0, &var);
|
||||||
ok(hres == E_NOTIMPL, "InvokeEx failed: %08x\n", hres);
|
ok(hres == E_NOTIMPL, "InvokeEx failed: %08x\n", hres);
|
||||||
|
|
||||||
IDispatchEx_Release(dispex);
|
IDispatchEx_Release(dispex);
|
||||||
|
@ -890,7 +890,7 @@ static void test_nextdispid(IDispatchEx *dispex)
|
||||||
SysFreeString(name);
|
SysFreeString(name);
|
||||||
|
|
||||||
V_VT(&var) = VT_EMPTY;
|
V_VT(&var) = VT_EMPTY;
|
||||||
hres = dispex_propput(dispex, dyn_id, &var);
|
hres = dispex_propput(dispex, dyn_id, 0, &var);
|
||||||
|
|
||||||
while(last_id != dyn_id) {
|
while(last_id != dyn_id) {
|
||||||
hres = IDispatchEx_GetNextDispID(dispex, fdexEnumAll, last_id, &id);
|
hres = IDispatchEx_GetNextDispID(dispex, fdexEnumAll, last_id, &id);
|
||||||
|
@ -976,7 +976,7 @@ static HRESULT WINAPI ActiveScriptParse_ParseScriptText(IActiveScriptParse *ifac
|
||||||
|
|
||||||
V_VT(&var) = VT_I4;
|
V_VT(&var) = VT_I4;
|
||||||
V_I4(&var) = 100;
|
V_I4(&var) = 100;
|
||||||
hres = dispex_propput(document, id, &var);
|
hres = dispex_propput(document, id, 0, &var);
|
||||||
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
|
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
|
||||||
|
|
||||||
tmp = SysAllocString(testW);
|
tmp = SysAllocString(testW);
|
||||||
|
@ -990,7 +990,37 @@ static HRESULT WINAPI ActiveScriptParse_ParseScriptText(IActiveScriptParse *ifac
|
||||||
hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL);
|
hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL);
|
||||||
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
|
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
|
||||||
ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var));
|
ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var));
|
||||||
ok(V_I4(&var) == 100, "V_I4(&var) == NULL\n");
|
ok(V_I4(&var) == 100, "V_I4(&var) = %d\n", V_I4(&var));
|
||||||
|
|
||||||
|
V_VT(&var) = VT_I4;
|
||||||
|
V_I4(&var) = 200;
|
||||||
|
hres = dispex_propput(document, id, DISPATCH_PROPERTYPUTREF, &var);
|
||||||
|
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
|
||||||
|
|
||||||
|
VariantInit(&var);
|
||||||
|
memset(&dp, 0, sizeof(dp));
|
||||||
|
memset(&ei, 0, sizeof(ei));
|
||||||
|
hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL);
|
||||||
|
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
|
||||||
|
ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var));
|
||||||
|
ok(V_I4(&var) == 200, "V_I4(&var) = %d\n", V_I4(&var));
|
||||||
|
|
||||||
|
memset(&dp, 0, sizeof(dp));
|
||||||
|
memset(&ei, 0, sizeof(ei));
|
||||||
|
V_VT(&var) = VT_I4;
|
||||||
|
V_I4(&var) = 300;
|
||||||
|
dp.cArgs = 1;
|
||||||
|
dp.rgvarg = &var;
|
||||||
|
hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYPUT, &dp, NULL, &ei, NULL);
|
||||||
|
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
|
||||||
|
|
||||||
|
VariantInit(&var);
|
||||||
|
memset(&dp, 0, sizeof(dp));
|
||||||
|
memset(&ei, 0, sizeof(ei));
|
||||||
|
hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL);
|
||||||
|
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
|
||||||
|
ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var));
|
||||||
|
ok(V_I4(&var) == 300, "V_I4(&var) = %d\n", V_I4(&var));
|
||||||
|
|
||||||
unk = (void*)0xdeadbeef;
|
unk = (void*)0xdeadbeef;
|
||||||
hres = IDispatchEx_GetNameSpaceParent(window_dispex, &unk);
|
hres = IDispatchEx_GetNameSpaceParent(window_dispex, &unk);
|
||||||
|
|
Loading…
Reference in New Issue