vbscript: Implement ScriptTypeInfo_GetVarDesc.

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:
Gabriel Ivăncescu 2019-12-06 13:46:06 +01:00 committed by Alexandre Julliard
parent 2d753e2aa2
commit efab3751f6
1 changed files with 17 additions and 3 deletions

View File

@ -673,10 +673,22 @@ static HRESULT WINAPI ScriptTypeInfo_GetFuncDesc(ITypeInfo *iface, UINT index, F
static HRESULT WINAPI ScriptTypeInfo_GetVarDesc(ITypeInfo *iface, UINT index, VARDESC **ppVarDesc) static HRESULT WINAPI ScriptTypeInfo_GetVarDesc(ITypeInfo *iface, UINT index, VARDESC **ppVarDesc)
{ {
ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface); ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface);
VARDESC *desc;
FIXME("(%p)->(%u %p)\n", This, index, ppVarDesc); TRACE("(%p)->(%u %p)\n", This, index, ppVarDesc);
return E_NOTIMPL; if (!ppVarDesc) return E_INVALIDARG;
if (index >= This->num_vars) return TYPE_E_ELEMENTNOTFOUND;
desc = heap_alloc_zero(sizeof(*desc));
if (!desc) return E_OUTOFMEMORY;
desc->memid = index + 1;
desc->varkind = VAR_DISPATCH;
desc->elemdescVar.tdesc.vt = VT_VARIANT;
*ppVarDesc = desc;
return S_OK;
} }
static HRESULT WINAPI ScriptTypeInfo_GetNames(ITypeInfo *iface, MEMBERID memid, BSTR *rgBstrNames, static HRESULT WINAPI ScriptTypeInfo_GetNames(ITypeInfo *iface, MEMBERID memid, BSTR *rgBstrNames,
@ -815,7 +827,9 @@ static void WINAPI ScriptTypeInfo_ReleaseVarDesc(ITypeInfo *iface, VARDESC *pVar
{ {
ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface); ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface);
FIXME("(%p)->(%p)\n", This, pVarDesc); TRACE("(%p)->(%p)\n", This, pVarDesc);
heap_free(pVarDesc);
} }
static const ITypeInfoVtbl ScriptTypeInfoVtbl = { static const ITypeInfoVtbl ScriptTypeInfoVtbl = {