Which state I can invoke interface methods safely in BHO?

Unanswered Which state I can invoke interface methods safely in BHO?

  • 21 April 2012 14:10
     
     

    I want to develop a tool for Web Automation test.

    I write a BHO for obtaining the attributes of an element. such as text, position and so on.

    but it sometimes cores dump when invoking some methods, for example, IHTMLElement->get_parentElement

    if IWebBrowser2->Busy is VARIANT_FALSE and IHTMLDocument->readyState is complete, the dump never happens.

    but it seems the verification is too strict. sometimes, some of web pages keep interactive state and the page seems normal. the operation will be blocked.

    so how to call methods safely? is there any better ways?


    • Diedit oleh spyinsky 21 April 2012 14:11
    •  

Semua Balasan

  • 23 April 2012 11:06
     
     
    Did you try to debug your tool, so that the cores dump

    NEU_ShieldEdge

  • 24 April 2012 2:31
     
     

    yes. I debug.

    dump happens when invoking some methods of the HTML object. but the object seems normal. only in different state.


    • Diedit oleh spyinsky 24 April 2012 2:32
    •  
  • 03 Mei 2012 16:13
     
     

    I get some IHTMLElement objects and put them in the list.

    then the page may refresh or load another page.

    so the control does not exist but IHTMLElement objects in list still exist, not released.

    when invoking their method, sometimes, it cores dump.

    • Diedit oleh spyinsky 03 Mei 2012 16:21
    •