L
leoleoleo
Unregistered / Unconfirmed
GUEST, unregistred user!
var
FileName:OleVariant ;
vv: Variant;
HTMLDocument: IHTMLDocument2;
begin
Browser.oleobject.navigate(FileName);
vv := VarArrayCreate([0,0],varVariant);
vv[0] := content;
HTMLDocument := browser.Document as IHTMLDocument2;
*: HTMLDocument.write(PSafeArray(TVarData(vv).VArray));
HTMLDocument.charset := 'gb2312';
HTMLDocument.close;
end;
上面的代码执行到*的时候如果ie版本为 5.00.2614.3500 则HTMLDocument=nil,并报地址访问错
如果ie版本为 5.5以上 则一切正常
FileName:OleVariant ;
vv: Variant;
HTMLDocument: IHTMLDocument2;
begin
Browser.oleobject.navigate(FileName);
vv := VarArrayCreate([0,0],varVariant);
vv[0] := content;
HTMLDocument := browser.Document as IHTMLDocument2;
*: HTMLDocument.write(PSafeArray(TVarData(vv).VArray));
HTMLDocument.charset := 'gb2312';
HTMLDocument.close;
end;
上面的代码执行到*的时候如果ie版本为 5.00.2614.3500 则HTMLDocument=nil,并报地址访问错
如果ie版本为 5.5以上 则一切正常