Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help! Exception in gaining element in HTMLDocument2 document

Help! Exception in gaining element in HTMLDocument2 document

Scheduled Pinned Locked Moved C / C++ / MFC
helpdatabasequestionannouncement
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 1 Offline
    1 Offline
    123ivan123
    wrote on last edited by
    #1

    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(); //......... }

    T 1 Reply Last reply
    0
    • 1 123ivan123

      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(); //......... }

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      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

      E 1 Reply Last reply
      0
      • T ThatsAlok

        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

        E Offline
        E Offline
        Eytukan
        wrote on last edited by
        #3

        u r there but "not" luking at my problem... i meant it,, but toxxct gave the answer for that ..:-D V

        T 1 Reply Last reply
        0
        • E Eytukan

          u r there but "not" luking at my problem... i meant it,, but toxxct gave the answer for that ..:-D V

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups