QueryInterface函数使用,该怎么处理

QueryInterface函数使用
CComPtr<IHTMLDocument2> pDoc;
pDoc = (IHTMLDocument2*)m_webaddress.GetDocument();
CComPtr<IHTMLElementCollection> pElemColl;
pDoc->get_all(&pElemColl);
LONG ncelem;
pElemColl->get_length(&ncelem);
HRESULT hr;
for (int m = 0; m < ncelem; m++)
{
_variant_t index;
IDispatch* pDisp2; 
hr = pElemColl->item(index,index, &pDisp2 );//
IHTMLSelectElement* pImage; 
hr = pDisp2->QueryInterface( IID_IHTMLSelectElement,(void **)&pImage);
if (SUCCEEDED(hr))
{

}

}
今天弄了 半天了 QueryInterface()函数总是返回false,pImage是空值,不知道怎么回事。

------解决方案--------------------
晕,我也是新手,留个意见吧,,

variant_t index; //这里要赋值;variant_t index = m;
IDispatch* pDisp2;
hr = pElemColl->item(index,index, &pDisp2 );//

------解决方案--------------------
http://msdn.microsoft.com/en-us/library/ms682521(v=vs.85).aspx
------解决方案--------------------
你看看别人是怎么用的,我也遇到这样的问题。C++的数据类型真复杂啊。。

variant_t index; 
index.vt=VT_I4; 
index.intVal=0; 
_variant_t name( "Submit "); 
IDispatchPtr disp; 
disp=pColl-> item(name,index); 

http://topic.csdn.net/t/20030610/13/1898133.html
------解决方案--------------------
探讨
赋值,还是不行,pImage还是空值
variant_t index;
index.vt=VT_I4;
index.intVal=0;
hr = pDisp2->QueryInterface( IID_IHTMLSelectElement,(void **)&amp;pImage);