IHTMLWindow2::execScript breaks after IE7 RC1



Hi,

My program hosts a web browser control. It's written in ATL and it pretty
much follows the atlbrowser.exe sample. I implemented the
IInternetSecurityManager, to override security settings. In
IInternetSecurityManager::ProcessUrlAction, I set *pPolicy to
URLPOLICY_ALLOW. For all other functions, I return "INET_E_DEFAULT_ACTION".
Additionally, I used the IPersistStreamInit interface (obtained from
IHTMLDocument2) to feed the HTML content into the web browser.

To provide dynamic interaction functions, I've built several javascript
libraries, they are loaded in the HTML code through <script
src="C:\\something.js"/>. By using IHTMLWindow2::execScript, I'm able to
call these functions from the host program to accomplish interaction tasks.

This works up to Internet Explorer 7 Beta 3. I just installed the IE7 RC1
update. All calls to IHTMLWindow2::execScript breaks. All calls will bring
up an "Internet Explorer Script Error" dialog. The error message includes:

Invalid character at Line 2 Char 1
Object expected at Line 1 Char 1
....and some others

I wasn't able to debug because there's nothing wrong with the javascript
code. The very same code works on IE7 Beta3 or IE6 if that matters.

I'd reviewed the release notes for IE7 RC1 and I didn't see an obvious
reason for this to break. I also tried setting several security options in
the Internet Zone (IPersistStreamInit works in the Internet Zone, and the
URL is always about:blank), including Enabling scripting of Internet
Explorer, and the behavior is still the same.

I'm wondering if anyone can give me a hint on fixing this problem. I thought
using IHTMLWindow2::execScript is a recommended way to interact between the
hosted browser control and the host program. Has anyone experienced similar
problems? How can I fix it?

Thanks in advance,
--
He Shiming


.



Relevant Pages

  • Re: IHTMLWindow2::execScript breaks after IE7 RC1
    ... My program hosts a web browser control. ... IInternetSecurityManager, to override security settings. ... the Internet Zone (IPersistStreamInit works in the Internet Zone, ... between the hosted browser control and the host program. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • www.example.com does exist (was: MX Records: separate web and email servers)
    ... $ host www.example.com. ... or "example.org" into your web browser. ... These domain names are reserved for use in documentation and are not ... -- Supreme Court Justice Potter Steart ...
    (comp.mail.sendmail)
  • Re: how to host browser control on a .NET control
    ... > I would like to host a web browser on a particular user control (or ... > window form) in my application. ...
    (microsoft.public.dotnet.languages.vb)
  • [ANN] h3270 1.0 released
    ... provides access to IBM 3270 hosts from within a web browser ... features a highly configurable layout engine that is based on regular ... general-purpose API for accessing IBM mainframe hosts from Java. ... On the host side, h3270 uses the s3270 program by Paul Mattes as a ...
    (comp.lang.java.softwaretools)