IHTMLDocument2 *pDoc2
......
IHTMLWindow2 *pWindow;HRESULT hr=pDoc2->get_parentWindow(&pWindow);VARIANT ret;ret.vt=VT_EMPTY;CComBSTR func="alert(document.cookie)";CComBSTR lang="java script";hr=pWindow->execScript(func,lang,&ret);