IDispatch* pRowDisp;
HRESULT hr = rowcollection->item(rowIndex, rowvar2, &pRowDisp );
if ( hr == S_OK )
{
IHTMLTableRow * row;
hr = pRowDisp->QueryInterface(IID_IHTMLTableRow,(void **)&row);
if ( hr == S_OK )
{
IHTMLElementCollection * cellcollection;
hr = row->get_cells(&cellcollection);
LONG cellcount;
cellcollection->get_length(&cellcount);
for(int celli = 0; celli < cellcount; celli++)
{
VARIANT cellIndex;
cellIndex.vt = VT_UINT;
cellIndex.lVal = celli;
VARIANT cellvar2;
VariantInit( &cellvar2 ); IDispatch* pCellDisp;
HRESULT hr = cellcollection->item(cellIndex, cellvar2, &pCellDisp );
if ( hr == S_OK )
{
ASSERT(pCellDisp);
IHTMLTableCell * cell;
hr = pCellDisp->QueryInterface(IID_IHTMLTableCell,(void **)&cell);
if ( hr == S_OK )
{
IHTMLElement * elename;
hr = cell->QueryInterface(IID_IHTMLElement,(void**)&elename);
if (hr == S_OK)
{
BSTR name;
elename->get_outerText(&name);
CString tmpname(name);
if (tmpname.Find("Zip Code:")!=-1)
// _asm int 3;
if (tmpname.GetLength()<512)
TRACE(tmpname);
// else
// _asm int 3; }
cell->Release();
}
pCellDisp->Release(); }
}
}
}
pRowDisp->Release();
HRESULT hr = rowcollection->item(rowIndex, rowvar2, &pRowDisp );
if ( hr == S_OK )
{
IHTMLTableRow * row;
hr = pRowDisp->QueryInterface(IID_IHTMLTableRow,(void **)&row);
if ( hr == S_OK )
{
IHTMLElementCollection * cellcollection;
hr = row->get_cells(&cellcollection);
LONG cellcount;
cellcollection->get_length(&cellcount);
for(int celli = 0; celli < cellcount; celli++)
{
VARIANT cellIndex;
cellIndex.vt = VT_UINT;
cellIndex.lVal = celli;
VARIANT cellvar2;
VariantInit( &cellvar2 ); IDispatch* pCellDisp;
HRESULT hr = cellcollection->item(cellIndex, cellvar2, &pCellDisp );
if ( hr == S_OK )
{
ASSERT(pCellDisp);
IHTMLTableCell * cell;
hr = pCellDisp->QueryInterface(IID_IHTMLTableCell,(void **)&cell);
if ( hr == S_OK )
{
IHTMLElement * elename;
hr = cell->QueryInterface(IID_IHTMLElement,(void**)&elename);
if (hr == S_OK)
{
BSTR name;
elename->get_outerText(&name);
CString tmpname(name);
if (tmpname.Find("Zip Code:")!=-1)
// _asm int 3;
if (tmpname.GetLength()<512)
TRACE(tmpname);
// else
// _asm int 3; }
cell->Release();
}
pCellDisp->Release(); }
}
}
}
pRowDisp->Release();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货