On 4/25/19 4:11 PM, Jactry Zeng wrote:
- if (FAILED(IScriptControl_get_State(iface, &state)) || (state != Initialized))
return E_FAIL;
You don't need to call methods internally to access state.
- language = a2bstr("vbscript");
- hr = IScriptControl_put_Language(sc, language);
- ok(hr == S_OK, "IScriptControl_put_Language failed: 0x%08x.\n", hr);
- SysFreeString(language);
- script_str = a2bstr("Set var1 = 1");
- V_VT(&var) = VT_EMPTY;
- V_I4(&var) = 0xdeadbeef;
- hr = IScriptControl_Eval(sc, script_str, &var);
- todo_wine ok(hr == 0x800a03ea, "IScriptControl_Eval returned: 0x%08x.\n", hr);
- ok(V_VT(&var) == VT_EMPTY, "V_VT(var) = %d\n", V_VT(&var));
- ok(V_I4(&var) == 0xdeadbeef || broken(V_I4(&var) == 0) /* after Win8 */,
"V_I4(var) = %d.\n", V_I4(&var));
- SysFreeString(script_str);
What's a point of this test?