mshtml: Avoid casts from COM objects to interfaces.

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2016-09-16 14:16:46 +02:00 committed by Alexandre Julliard
parent d39d1464f3
commit a14674aa36
2 changed files with 2 additions and 2 deletions

View File

@ -400,7 +400,7 @@ static BOOL is_elem_name(HTMLElement *elem, LPCWSTR name)
static HRESULT get_item_idx(HTMLElementCollection *This, UINT idx, IDispatch **ret)
{
if(idx < This->len) {
*ret = (IDispatch*)This->elems[idx];
*ret = (IDispatch*)&This->elems[idx]->node.event_target.dispex.IDispatchEx_iface;
IDispatch_AddRef(*ret);
}

View File

@ -1024,7 +1024,7 @@ void call_event_handlers(HTMLDocumentNode *doc, HTMLEventObj *event_obj, EventTa
int i;
V_VT(&arg) = VT_DISPATCH;
V_DISPATCH(&arg) = (IDispatch*)event_obj;
V_DISPATCH(&arg) = (IDispatch*)&event_obj->dispex.IDispatchEx_iface;
i = data->event_table[eid]->handler_cnt;
while(i--) {