Help! Exception in gaining element in HTMLDocument2 document
-
when variable i increase to some value(not definite),exception occurs,is it a bug of ie6.0? Thx a not! Source code goes as follows: IHTMLDocument2* pDoc2=NULL; IHTMLElementCollection* ppCollection=NULL; IDispatch* ppvdispOption=NULL; pDoc2->get_all(&ppCollection); Assert(ppCollection); ppCollection->get_length(&Count); for (long i=0;iitem(index,index,&ppvdispOption); } catch (...) { tagstr.Format("%d",i); AfxMessageBox(tagstr); return FALSE; } if(!ppvdispOption) continue; ppvdispOption->QueryInterface(IID_IHTMLElement,(void **) &pElement); ppvdispOption->Release(); //......... }
-
when variable i increase to some value(not definite),exception occurs,is it a bug of ie6.0? Thx a not! Source code goes as follows: IHTMLDocument2* pDoc2=NULL; IHTMLElementCollection* ppCollection=NULL; IDispatch* ppvdispOption=NULL; pDoc2->get_all(&ppCollection); Assert(ppCollection); ppCollection->get_length(&Count); for (long i=0;iitem(index,index,&ppvdispOption); } catch (...) { tagstr.Format("%d",i); AfxMessageBox(tagstr); return FALSE; } if(!ppvdispOption) continue; ppvdispOption->QueryInterface(IID_IHTMLElement,(void **) &pElement); ppvdispOption->Release(); //......... }
123ivan123 wrote: IHTMLDocument2* pDoc2=NULL; IHTMLElementCollection* ppCollection=NULL; IDispatch* ppvdispOption=NULL; PROBLEM IS HERE pDoc2->get_all(&ppCollection);
pDoc2
haven't got any memory!"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
123ivan123 wrote: IHTMLDocument2* pDoc2=NULL; IHTMLElementCollection* ppCollection=NULL; IDispatch* ppvdispOption=NULL; PROBLEM IS HERE pDoc2->get_all(&ppCollection);
pDoc2
haven't got any memory!"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
u r there but "not" luking at my problem... i meant it,, but toxxct gave the answer for that ..:-D V
Vivekuniq wrote: u r there but "not" luking at my problem. Yeah i looked at your problem, But when I see Tox already given you the answer, So i think there is no need of redundancy .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV