vc6写如下代码,想提取网页上的链接 CComQIPtr<IHTMLDocument2, &IID_IHTMLDocument2> pDoc2;
CComPtr<IHTMLElementCollection> pElementCol;
CComPtr<IHTMLAnchorElement> pLoct; HRESULT hr;
    pDoc2=(IHTMLDocument2*)m_Web.GetDocument();   //由控件得到IHTMLDocument2接口指针 

if(pDoc2==NULL)   
{
MessageBox("IHTMLDocument2接口指针为空!");
return;
}   
hr=pDoc2->get_links(&pElementCol); //得到网页上的链接
if(S_OK!=hr)
{
MessageBox("得到网页链接错误!");
return;
}
pDoc2->QueryInterface(IID_IHTMLAnchorElement,(void **) &pLoct); BSTR bstrString;


pLoct->get_href(&bstrString);执行到pLoct->get_href(&bstrString);程序就崩溃,debug看到bstrString显示error:expression cannot be evaluated,
pLoct也是同样的错误请问是怎么回事?