mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
vbscript: Implement ScriptTypeInfo_Invoke.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
09b9da5bba
commit
5e912f2869
1 changed files with 24 additions and 2 deletions
|
@ -858,11 +858,33 @@ static HRESULT WINAPI ScriptTypeInfo_Invoke(ITypeInfo *iface, PVOID pvInstance,
|
|||
DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||
{
|
||||
ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface);
|
||||
ITypeInfo *disp_typeinfo;
|
||||
IDispatch *disp;
|
||||
HRESULT hr;
|
||||
|
||||
FIXME("(%p)->(%p %d %d %p %p %p %p)\n", This, pvInstance, memid, wFlags,
|
||||
TRACE("(%p)->(%p %d %d %p %p %p %p)\n", This, pvInstance, memid, wFlags,
|
||||
pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
|
||||
return E_NOTIMPL;
|
||||
if (!pvInstance) return E_INVALIDARG;
|
||||
if (memid <= 0) return TYPE_E_ELEMENTNOTFOUND;
|
||||
|
||||
if (!get_func_from_memid(This, memid) && memid > This->num_vars)
|
||||
{
|
||||
hr = get_dispatch_typeinfo(&disp_typeinfo);
|
||||
if (FAILED(hr)) return hr;
|
||||
|
||||
return ITypeInfo_Invoke(disp_typeinfo, pvInstance, memid, wFlags, pDispParams,
|
||||
pVarResult, pExcepInfo, puArgErr);
|
||||
}
|
||||
|
||||
hr = IUnknown_QueryInterface((IUnknown*)pvInstance, &IID_IDispatch, (void**)&disp);
|
||||
if (FAILED(hr)) return hr;
|
||||
|
||||
hr = IDispatch_Invoke(disp, memid, &IID_NULL, LOCALE_USER_DEFAULT, wFlags,
|
||||
pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
IDispatch_Release(disp);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptTypeInfo_GetDocumentation(ITypeInfo *iface, MEMBERID memid, BSTR *pBstrName,
|
||||
|
|
Loading…
Reference in a new issue