我正在开发 IE BHO,在访问 html 文档中的框架时出现此错误
这是代码。
foreach (SHDocVw.InternetExplorer objExplorer in objShellWins)
{
if (objExplorer.Document is HTMLDocument)
{
objDocument = (mshtml.HTMLDocument)objExplorer.Document;
mshtml.HTMLDocument doc = (mshtml.HTMLDocument)objExplorer.Document;
mshtml.FramesCollection frames = (mshtml.FramesCollection)doc.frames; //Exception at this line
}
}
这里有什么问题?