hyyly / csexwb2

Automatically exported from code.google.com/p/csexwb2
0 stars 0 forks source link

Exception in GetFrames: "Error HRESULT E_FAIL has been returned from a call to a COM component." #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Calling GetFrames while a page is loading sometimes may result in a 
exception.

What are the OS and IE versions?
xp pro SP 2, IE 6.0.2900.2180...

What version of the product are you using?
1.0.0.5

Please provide any additional information below.
With debugging I can see that in cEXWB.cs GetFrames (line 2911) calls 
IsWBFrameset(brow) 

(line 2941). The Line 2970 of IsWBFrameset

IHTMLDocument2 doc2 = pWB.Document as IHTMLDocument2;

is the actual place of the error: Accessing .Document throws an 

System.Runtime.InteropServices.COMException.

In the SHIFT-F9-Window (don't know how it is called in english VS version) 
for pWB I can 

see that pWB is a {mshtml.HTMLIFrameClass}. If I use

((mshtml.HTMLIFrameClass)(pWB)).document

instead of pWB.Document or

(IHTMLDocument2)((mshtml.HTMLIFrameClass)(pWB)).document

I get no error in the SHIFT-F9-Window and have access to the document 
property, but I havn't tested this solution in real code yet.

dartrax

Original issue reported on code.google.com by dart...@googlemail.com on 25 Sep 2007 at 11:32

GoogleCodeExporter commented 9 years ago
Could you provide a url that produces this exception?

MH

Original comment by mehr...@gmail.com on 26 Sep 2007 at 12:46

GoogleCodeExporter commented 9 years ago

Original comment by mehr...@gmail.com on 12 Oct 2007 at 2:18