こんにちは私は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;
しかし、プログラムはタイプ「OLEERROR805303E8」のエラーを示しています。実行をトレースしたところ、問題が次の行にあることがわかりました。domhtmldoc.Write (nsstr.AString)
関数「write」がコンポーネントのインターフェイスで宣言されています。
nsIDOMHTMLDocument = interface(nsIDOMDocument)
procedure Writeln(const text: nsAString); safecall;
.....
end;
そのようなエラーに遭遇しましたか?