From 3612bae30c0496d13d076358ab41478e337deee6 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 9 Sep 2008 01:21:38 +0200 Subject: [PATCH] jscript: Added GetMemberName implementation. --- dlls/jscript/dispex.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 0d8bbe1e9a7..270e17299cf 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -614,8 +614,19 @@ static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName) { DispatchEx *This = DISPATCHEX_THIS(iface); - FIXME("(%p)->(%x %p)\n", This, id, pbstrName); - return E_NOTIMPL; + dispex_prop_t *prop; + + TRACE("(%p)->(%x %p)\n", This, id, pbstrName); + + prop = get_prop(This, id); + if(!prop || !prop->name || prop->type == PROP_DELETED) + return DISP_E_MEMBERNOTFOUND; + + *pbstrName = SysAllocString(prop->name); + if(!*pbstrName) + return E_OUTOFMEMORY; + + return S_OK; } static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)