Module: wine Branch: master Commit: 3612bae30c0496d13d076358ab41478e337deee6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3612bae30c0496d13d076358ab...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Sep 9 01:21:38 2008 +0200
jscript: Added GetMemberName implementation.
---
dlls/jscript/dispex.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 0d8bbe1..270e172 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)