[PATCH 11/12] vbscript: Implement ScriptTypeLib_IsName.
Gabriel Ivăncescu
gabrielopcode at gmail.com
Mon Jan 27 09:33:06 CST 2020
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
dlls/vbscript/vbdisp.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c
index bae5f42..84f639e 100644
--- a/dlls/vbscript/vbdisp.c
+++ b/dlls/vbscript/vbdisp.c
@@ -1371,10 +1371,26 @@ static HRESULT WINAPI ScriptTypeLib_GetDocumentation(ITypeLib *iface, INT index,
static HRESULT WINAPI ScriptTypeLib_IsName(ITypeLib *iface, LPOLESTR szNameBuf, ULONG lHashVal, BOOL *pfName)
{
ScriptTypeInfo *This = ScriptTypeInfo_from_typelib_ITypeLib(iface);
+ ITypeInfo *typeinfo;
+ MEMBERID memid;
+ USHORT cnt = 1;
+ HRESULT hr;
- FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(szNameBuf), lHashVal, pfName);
+ TRACE("(%p)->(%s %08x %p)\n", This, debugstr_w(szNameBuf), lHashVal, pfName);
- return E_NOTIMPL;
+ if (!szNameBuf || !pfName) return E_INVALIDARG;
+
+ hr = ITypeLib_FindName(iface, szNameBuf, lHashVal, &typeinfo, &memid, &cnt);
+ if (FAILED(hr)) return hr;
+
+ if (!cnt)
+ *pfName = FALSE;
+ else
+ {
+ *pfName = TRUE;
+ ITypeInfo_Release(typeinfo);
+ }
+ return S_OK;
}
static HRESULT WINAPI ScriptTypeLib_FindName(ITypeLib *iface, LPOLESTR szNameBuf, ULONG lHashVal,
--
2.21.0
More information about the wine-devel
mailing list