W
windwy
Unregistered / Unconfirmed
GUEST, unregistred user!
IEThis是IWebbrowser2
var
doc: IHTMLDocument2;
frames: IHTMLFramesCollection2;
all: IHTMLElementCollection;
len,
i: Integer;
OleI: olevariant;
OleWin: olevariant;
aWindow: IHTMLWindow2;
begin
doc := IEThis.Document as IHTMLDocument2;
all := doc.all as IHTMLElementCollection;
frames := doc.frames as IHTMLFramesCollection2;
len := frames.length;
for i := 0 to len - 1 do
begin
OleI := i;
OleWin := frames.item(OleI);
OleWin.QueryInterface(IID_IHTMLWindow2, aWindow);
......
end;
end;
程序在OleWin.QueryInterface(IID_IHTMLWindow2, aWindow);报错!
我这种方法是不是有问题?我是在http://www.csdn.net/expert/topic/420/420506.xml
上面看的VC++的例子。是不是有其他的方法?
救急呀!!!
var
doc: IHTMLDocument2;
frames: IHTMLFramesCollection2;
all: IHTMLElementCollection;
len,
i: Integer;
OleI: olevariant;
OleWin: olevariant;
aWindow: IHTMLWindow2;
begin
doc := IEThis.Document as IHTMLDocument2;
all := doc.all as IHTMLElementCollection;
frames := doc.frames as IHTMLFramesCollection2;
len := frames.length;
for i := 0 to len - 1 do
begin
OleI := i;
OleWin := frames.item(OleI);
OleWin.QueryInterface(IID_IHTMLWindow2, aWindow);
......
end;
end;
程序在OleWin.QueryInterface(IID_IHTMLWindow2, aWindow);报错!
我这种方法是不是有问题?我是在http://www.csdn.net/expert/topic/420/420506.xml
上面看的VC++的例子。是不是有其他的方法?
救急呀!!!