Jacek Caban : mshtml: Added IDispatchEx::GetNextDispID implementation.
Alexandre Julliard
julliard at winehq.org
Tue Sep 8 08:54:47 CDT 2009
Module: wine
Branch: master
Commit: 249ab3b33f04df7a9af86e7b7d6f478b13dc5918
URL: http://source.winehq.org/git/wine.git/?a=commit;h=249ab3b33f04df7a9af86e7b7d6f478b13dc5918
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sun Sep 6 18:52:21 2009 +0200
mshtml: Added IDispatchEx::GetNextDispID implementation.
---
dlls/mshtml/dispex.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
index 6307428..d21d8ee 100644
--- a/dlls/mshtml/dispex.c
+++ b/dlls/mshtml/dispex.c
@@ -899,8 +899,56 @@ static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BS
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
{
DispatchEx *This = DISPATCHEX_THIS(iface);
- FIXME("(%p)->(%x %x %p)\n", This, grfdex, id, pid);
- return E_NOTIMPL;
+ dispex_data_t *data;
+ func_info_t *func;
+ HRESULT hres;
+
+ TRACE("(%p)->(%x %x %p)\n", This, grfdex, id, pid);
+
+ if(is_dynamic_dispid(id)) {
+ DWORD idx = id - DISPID_DYNPROP_0;
+
+ if(!This->dynamic_data || This->dynamic_data->prop_cnt <= idx)
+ return DISP_E_UNKNOWNNAME;
+
+ if(idx+1 == This->dynamic_data->prop_cnt) {
+ *pid = DISPID_STARTENUM;
+ return S_FALSE;
+ }
+
+ *pid = id+1;
+ return S_OK;
+ }
+
+ data = get_dispex_data(This);
+ if(!data)
+ return E_FAIL;
+
+ if(id == DISPID_STARTENUM) {
+ func = data->funcs;
+ }else {
+ hres = get_builtin_func(data, id, &func);
+ if(FAILED(hres))
+ return hres;
+ func++;
+ }
+
+ while(func < data->funcs+data->func_cnt) {
+ /* FIXME: Skip hidden properties */
+ if(func->func_disp_idx == -1) {
+ *pid = func->id;
+ return S_OK;
+ }
+ func++;
+ }
+
+ if(This->dynamic_data && This->dynamic_data->prop_cnt) {
+ *pid = DISPID_DYNPROP_0;
+ return S_OK;
+ }
+
+ *pid = DISPID_STARTENUM;
+ return S_FALSE;
}
static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
More information about the wine-cvs
mailing list