https://bugs.winehq.org/show_bug.cgi?id=53889
Bug ID: 53889 Summary: vbscript does not support Get_Item call on IDispatch objects Product: Wine Version: 7.20 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs@winehq.org Reporter: jsm174@gmail.com Distribution: ---
I ran into some code with where an IDispatch object has a Get_Item method:
PlayerScores(0).SetValue(1000)
In interp.c, `do_icall` will E_NOTIMPL for REF_OBJ when there are arguments:
if(arg_cnt) { FIXME("arguments on object\n"); return E_NOTIMPL; }
To work around this, I added the following:
+ if (arg_cnt) { + vbstack_to_dp(ctx, arg_cnt, FALSE, &dp); + + hres = IDispatch_Invoke(ref.u.obj, DISPID_VALUE, &IID_NULL, + LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &dp, res, + NULL, NULL); + + if(FAILED(hres)) + return hres; + + IDispatch_AddRef(V_DISPATCH(res)); + + break; + }
IDispatch_AddRef(ref.u.obj); V_VT(res) = VT_DISPATCH; V_DISPATCH(res) = ref.u.obj;
https://bugs.winehq.org/show_bug.cgi?id=53889
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- Jason, could you please produce some small but complete vbscript sample that hits this path?
https://bugs.winehq.org/show_bug.cgi?id=53889
--- Comment #2 from Jason Millard jsm174@gmail.com --- Sure. Let me see if I can pull it out of the memory banks ????