internet explorer no longer launches from my app - please help!

G

Guest

before installing the latest security updates to windows xp, i was, within my app, able to launch internet explorer to allow users to access my web site. now it only works if ie is already launched. if ie isn't launched i get an error message: Problem with shortcut - Unable to open "http://www.mysite.com". source code appears below. i'm stumped. can anyone please help? thanks!!!


sprintf(sBuf,"url.dll, FileProtocolHandler http://mysite.com")
ShellExecute(NULL, NULL, "RunDLL32.EXE", sBuf, NULL, SW_SHOWNORMAL)

the following older code has the same effect

ShellExecute(NULL, NULL, "http://www.mysite.com", NULL, NULL, SW_SHOWNORMAL)
 
W

William DePalo [MVP VC++]

angela wells said:
before installing the latest security updates to windows xp,
i was, within my app, able to launch internet explorer to
allow users to access my web site. now it only works
if ie is already launched.

I can't say that I know what is the problem.

However, until you find a resolution you might try this

iexplore.exe -new http://www.mysite.com

at the command line. If that works, you should be able to use
CreateProcess() or ShellExecute() to effect the same thing.

Regards,
Will
 
G

Guest

Thanks Will! Your suggestion worked great! I wonder, is there an API function I can call to get the default browser, so I can substitute that value for "iexplore.exe"? Thanks for your kind help. angela
 
W

William DePalo [MVP VC++]

angela wells said:
Thanks Will!

You are welcome.
I wonder, is there an API function I can call to
get the default browser, so I can substitute that
value for "iexplore.exe"?

An easy thing to do is to create an .HTM file (it doesn't have to contain
anything valid) and then pass its name to FindExecutable(). You could also
look for the info about file assocaitions in the registry.

I didn't suggest that originally because I thought you specifically needed a
new instance of the browser. That's why I used the "-new" modifier on the
command line. I don't know if there is any commonality with respect to
command line parameters among the browsers. In other words, I'm not sure
that the conditions under which browsers choose to use an existing instance
of the browser or create a new one are at all common.

A decade ago, and before the browser war ended <g>, SpyGlass published a
spec implemented with Dynamic Data Exchange (DDE) protocol on Windows and
something else on Macs so that you could do the kind of thing you want in a
browser independent, and (almost) platform independent way. I know it worked
in '95 when I last used it <g>, I don't know if it is still a viable option.

Nevertheless, the knowledge base article that barely describes it still
lives here:

http://support.microsoft.com/?id=160957

Regards,
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top