Сам разобрался:
| Код | if( cpwbrwsr1->Document ) { TComInterface<IHTMLDocument2> pDocument; cpwbrwsr1->Document->QueryInterface(IID_IHTMLDocument2, (LPVOID*)&pDocument);
if( pDocument ) { TComInterface<IHTMLElementCollection> pCollection; pDocument->get_all(&pCollection);
if( pCollection ) { TComInterface<IDispatch> pDisp1; TComInterface<IDispatch> pDisp2; TComInterface<IHTMLElement> pElement1; TComInterface<IHTMLElement> pElement2;
pCollection->item(Variant(WideString("Name")), Variant(0), &pDisp1);
if( pDisp1 ) { //TComInterface<IHTMLElement> pElement; pDisp1->QueryInterface(IID_IHTMLElement, (LPVOID*)&pElement1);
if( pElement1 ) { pElement1->put_innerText(str1); } }
pCollection->item(Variant(WideString("Password")), Variant(0), &pDisp2); if( pDisp2 ) { //TComInterface<IHTMLElement> pElement; pDisp2->QueryInterface(IID_IHTMLElement, (LPVOID*)&pElement2);
if( pElement2 ) { pElement2->put_innerText(str2); } } } } }
|
|