0
你好 我正在測試一個函數來加載一個html代碼在geckobrowser(德爾福壁虎組件)。 這裏的功能在Delphi中的OLE錯誤805303E?
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錯誤805303E8」的錯誤。我跟蹤執行,發現問題出在線路:domhtmldoc.Write (nsstr.AString)
功能「寫」在我的組件的接口中聲明:
nsIDOMHTMLDocument = interface(nsIDOMDocument)
procedure Writeln(const text: nsAString); safecall;
.....
end;
你有沒有遇到過這樣的錯誤?
你使用什麼Delphi包(組件)?,我將不得不復制錯誤第一 – 2011-04-13 09:09:23
這似乎是一個幾乎完全重複的免費pascal論壇上的帖子:http:// www .lazarus.freepascal.org/index.php/topic,7854.25/wap2.html(根據2009年11月13日印刷版:http://www.lazarus.freepascal.org/index.php?action=printpage;topic = 7854.0)您是否嘗試了「菲爾」迴應這個問題的建議? – 2011-04-13 09:22:10
是的我可以檢索頁面的html,或者我還沒有在C++或Java中找到與「寫入」 – user653395 2011-04-13 09:53:50