Здравствуйте RuberoiD, Вы писали:
RD>Такая проблема:
RD>procedure TForm1.Button1Click(Sender: TObject);
RD>var
RD> i : integer;
RD> s : string;
RD> ov : OleVariant;
RD> iDoc : IHTMLDocument2;
RD> iDisp : IDispatch;
RD> iFrames2 : IHTMLFramesCollection2;
RD> iWindow2 : IHTMLWindow2;
RD> iFrameDoc : IHTMLDocument2;
RD>begin
RD> iDoc:=Form1.Browser1.ControlInterface.Document as IHTMLDocument2;
RD> iFrames2:=iDoc.frames as IHTMLFramesCollection2;
RD> for i:=1 to iFrames2.length do
RD> begin
RD> ov:=i-1;
RD> iDisp:=iFrames2.item(ov);
RD> iDisp.QueryInterface(IHTMLWindow2,iWindow2);
RD> iWindow2.document.QueryInterface(IHTMLDocument2,iFrameDoc);
RD> {ВЫДАЕТ ОШИБКУ "НЕТ ДОСТУПА"}
RD> s:=iFrameDoc.title;
RD> end;
RD>end;
На C++ это делается так:
IHTMLDocument2 *pDoc2 = NULL;
IHTMLWindow2 *pWin2 = NULL;
// иниц-я pUnk...
pUnk->QueryInterface (__uuidof(IHTMLDocument2), (void**)&pDoc2);
if (pDoc2==NULL)
return;
pDoc2->get_parentWindow(&pWin2);
возможно сначала нужно получить коллекцию фреймов, потом IHTMLWindow2 нужного фрейма и уж потом IHTMLDocument2...