获得IHTMLElementCollection*指针之后
Getlenth结果等于0;void CxxxxxxDlg::DownloadCompleteExplorer1()
{
mysss.ShowWindow(1);
IHTMLDocument2* pDoc2= (IHTMLDocument2*)mysss.get_Document() ;
ASSERT(pDoc2);
IHTMLElementCollection *pColl;
pDoc2->get_all((IHTMLElementCollection**)&pColl);
ASSERT(pColl);
long nElemCount = 0;
pColl->get_length(&(long)nElemCount);
for(int i = 0;i < nElemCount ;i++)
{
CComDispatchDriver spInputElement; 
pColl->item(CComVariant(i),CComVariant(),&spInputElement );

CComVariant vName,vVal,vType; // 域名称,域值,域类型
spInputElement.GetPropertyByName( L"name", &vName );
spInputElement.GetPropertyByName( L"value",&vVal );
spInputElement.GetPropertyByName( L"type", &vType );
}
}