Re: Using a WWW browser forclient I/O

Nick Lamb (njl98r nospam at ecs.soton.ac.uk)
Sat, 1 May 1999 19:05:18 +0100 (GMT)

On Sat, 1 May 1999, Marc van Woerkom wrote:

> > No, just use the URL as if it were the name of a program, in WinExec iirc.
>
> Daniel, I can only guess what you mean - iirc sounds like the name of a
> Win32 IRC client - do you suggest using it as a means to control the
> browser?

Nah. iirc == If I Recall Correctly
So he means "just us the URL as if it were the name of a program - send
it to the Win32 function WinExec() as a parameter, and you'll get a web
browser, window instance or whatever was appropriate created, if I
recall correctly."

I've never written a line of Win32 code (thankfully) but I guess you
just say something like this:

/* Example code starts here */
char myurl[]= "http://www.example.com/directory/page.html";
WinExec(myurl);
/* Example code finishes here */

> It is amazing that there is (or I am not aware of) a simple way
> for most platforms for the client to tell the browser it should
> display a different page.

Well the above seems pretty simple to me, for Win32
Win16 isn't worth bothering about, since it's totally obsolete.
Unix has netscape -remote, and various Desktops wrap this for their own
purposes e.g. Gnome and KDE have wrappers AFAIK.

You could in theory, in Linux at least, add an OS binary handler for this
special case, but that seems really excessive. We're not trying to build
Windows 2000 here, just display a web page.

Nick.