Invoke htmlelement event sometome failed, why?
- From: "victorzou" <victor.zou@xxxxxxxxxxx>
- Date: 23 Nov 2006 01:19:42 -0800
I want to fire htmlelement event with the following code fragment,
sometime is work ,and sometime it failed.
.......
CComPtr < IHTMLElement > pEle; // I have got it .
CComVariant vClickevent;
vClickevent=NULL;
pEle->get_onclick(&vClickevent); // get vClientvent ok!
if (V_VT(&vClickevent) == VT_DISPATCH && V_DISPATCH(&vClickevent))
{
IDispatch* pHandler = V_DISPATCH(&vClickevent); //get
handle ok!
DISPPARAMS params = {0};
HRESULT hresult;
hresult = pHandler->Invoke(DISPID_VALUE, IID_NULL,
LOCALE_USER_DEFAULT, DISPATCH_METHOD, ¶ms, 0, 0, 0);
}
sometime the result hresult =-2147418113 .
wait for succor.
tks
victor
.
- Prev by Date: Re: Overloading script engine from IHTMLDocument::get_Script
- Next by Date: Invoke htmlelement event sometome failed, why?
- Previous by thread: BHO and IE scroll events (c#)
- Next by thread: Invoke htmlelement event sometome failed, why?
- Index(es):
Relevant Pages
|
|