开发者

OLE ERROR 805303E in delphi?

hello I am testing a function to load an html code in a geckobrowser (gecko component in Delphi). Here the function

   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;

but the programme show an error of type "OLE ERROR 805303E8". I traced execution and found that the problem is in the line: domhtmldoc.Write (nsstr.AString) the function "write" is declared in the interface of my component:

    nsIDOMHTMLDocument = interface(nsIDOMDocument)
      procedure Writeln(const text: nsAString); safecall;
    .....
    end;

Have you encountered such an 开发者_JAVA百科error?


I used a temporary solution that needs to create a temporary file and then load do with the gecko. but with this solution, I can not make a step backwards.

that's why I seek another solution that allows me to make change on the webpage. thancks for your help

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜