This is the discussion forum for the HtmlEditor. See also the
HtmlEditor home page, where you can download the control, and the
Documentation Wiki, a collaborative project for documenting the control.
Unable to call IHTMLWindow2.execScript()
Posted by:
Sacha Faust (199.72.29.---)
Date: Monday, 28-Jul-2003, 20:45:33
I've been trying to load html in IE from a string buffer latelly and it works fine but something happens when you try to get an instance of the IHTMLWindow2 via the HTMLDocument.Scripts property.
Using HtmlEditor I get the same problem, if you try to call in the IHTMLWindow2 , you get an exception related to an invalid handle.
I only get that when I load HTMLDocument object from a buffer but if I use
IE object Navigate call to a local resource , it works fine.
Any idea what happens?
Re: Unable to call IHTMLWindow2.execScript()
Posted by:
kokman (116.25.51.---)
Date: Monday, 08-Sep-2008, 10:49:10
following code is in DempHtmlApp project:
IHTMLWindow2 win = this.htmlEditor1.HtmlDocument2.GetParentWindow();
win.execScript("runscript();", "javascript");
It always hints an error: Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)
pls help!
-------------------------------------------------------
Sacha Faust Wrote:
-------------------------------------------------------
> I've been trying to load html in IE from a string
> buffer latelly and it works fine but something
> happens when you try to get an instance of the
> IHTMLWindow2 via the HTMLDocument.Scripts
> property.
>
> Using HtmlEditor I get the same problem, if you
> try to call in the IHTMLWindow2 , you get an
> exception related to an invalid handle.
>
> I only get that when I load HTMLDocument object
> from a buffer but if I use
> IE object Navigate call to a local resource , it
> works fine.
>
> Any idea what happens?