IDispatch *pDisp1 = NULL;
HRESULT hr2=spFormElement->get_elements(&pDisp1);//spFormElement是一个IHTMLFormElement类型的指针;
CComQIPtr< IHTMLElementCollection > spElementCollection1;
HRESULT hr3=pDisp1->QueryInterface(IID_IHTMLElementCollection,(void**)&spElementCollection1);