[英]OLE ERROR 805303E in delphi?
你好,我正在测试在geckobrowser(Delphi中的gecko组件)中加载html代码的功能。 这里的功能
procédure TCustomGeckoBrowser.LoadHTML (htmlCode: string);
var
domwindow: nsIDOMWindow;
domdoc: nsIDOMDocument;
domhtmldoc: nsIDOMHTMLDocument;
nsstr: IInterfacedString;
begin
domwindow: = GetContentWindow;
domdoc: = GetContentDocument;
domhtmldoc: = domdoc que nsIDOMHTMLDocument;
nsstr: = nouvelleChaine;
nsstr.Assign (htmlCode);
domhtmldoc.Write (nsstr.AString);
end;
但是程序显示类型为“ OLE ERROR 805303E8”的错误。 我跟踪执行,发现问题出在行中: domhtmldoc.Write (nsstr.AString)
在组件的接口中声明了“写入”功能:
nsIDOMHTMLDocument = interface(nsIDOMDocument)
procedure Writeln(const text: nsAString); safecall;
.....
end;
您遇到过这样的错误吗?
我使用了一个临时解决方案,该解决方案需要创建一个临时文件,然后使用壁虎进行加载。 但是使用此解决方案,我无法退后一步。
这就是为什么我寻求另一种解决方案,使我可以在网页上进行更改。 谢谢您的帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.