Which state I can invoke interface methods safely in BHO?

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

  • 2012年4月21日 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?


    • 已编辑 spyinsky 2012年4月21日 14:11
    •  

全部回复

  • 2012年4月23日 11:06
     
     
    Did you try to debug your tool, so that the cores dump

    NEU_ShieldEdge

  • 2012年4月24日 2:31
     
     

    yes. I debug.

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


    • 已编辑 spyinsky 2012年4月24日 2:32
    •  
  • 2012年5月3日 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.

    • 已编辑 spyinsky 2012年5月3日 16:21
    •