This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Subject: Re: Setup.exe





>

> Message-ID: <51789.213.38.17.50.1042046662.squirrel@raq299.uk2net.com>
> Date: Wed, 8 Jan 2003 17:24:22 -0000 (GMT)
> Subject: Re: Setup.exe
> From: "Dave Hooper" <dave@rebuzz.org>
> To: cygwin@cygwin.com
> MIME-Version: 1.0
> Content-Type: text/plain;charset=iso-8859-1
>
>

> >>> Isn't that kinda up to the user. When you finish downloading new
> >>> packages you kill your internet connection as cygwin setup won't
> >>> need it.
> >
> > Autodialling isn't something that (most) programs do. Windows does it
for
> > them. So setup doesn't know if a connection was made on it's account or
> > not.
>
> I'd agree that it isn't something most programs do. I'd disagree if you
> were to say "Autodialling isn't something that most programs need to do",
> however. Windows cannot know that setup.exe has 'finished' with the
> internet connection (I believe Windows will by default wait until
> setup.exe has exitted before closing the dialup connection) unless
> setup.exe gives Windows a hint.  I'm almost utterly convinced that a
> sequence in setup.exe a bit like the following will do the trick
> admirably.
>
> DWORD dwNetAccess;
> InternetGetConnectedState(&dwNetAccess,0);
> if (dwNetAccess & INTERNET_CONNECTION_MODEM)
> {
>   // autodial now.  windows will update a reference count
>   // if the connection is already open
>   InternetAutoDial(INTERNET_AUTODIAL_FORCE_ONLINE, &hwndSetupDialog);
> }
>
> [snip - setup.exe goes and downloads the packages]
>
> if (dwNetAccess & INTERNET_CONNECTION_MODEM)
> {
>   // hang up.  windows will decrease a reference count.
>   // Can't remember if Windows prompts the user if they
>   // wish to close the dialup connection when the reference
>   // count reaches zero, or if Windows just does it anyway!
>   InternetAutodialHangup(0);
> }
>
>
> I'm speculating, I'll try it when I get a chance.  Of course this relies
> on behaviour built into Internet Explorer 4 and newer (more accurately
> built into the version of WinInet.dll shipping with IE 4, or a newer
> version of that dll) but setup.exe can easily test for the presence of
> this and do what it currently does if it can't find the functions or
can't
> find wininet.dll in the path.
>
> > Isn't the change from downloading to installing info enough?
>
> Some people won't notice that.  A larger issue is if you go away and make
> some tea.  I for one don't stare at setup.exe while it downloads
> eighty-six megabytes of information on a 33.6K modem.  (I do sit and
watch
> defrag for hours on end though, but that's just me)
>
> > http://sources.redhat.com/cygwin-apps/setup.html
>
> Thanks.  Will play.
>
>
> d

I'll leap in here too...

If Windoze is smart enough to autodial when some program wants to use the
internet it then should be smart enough to notice that the connection has
gone idle and do an idle time-out for hanging up. If not, then its broken.

You can't blame the program that USES that auto-dialed connection for not
hanging up. It didn't dial, why should it hang up? Every program that might
use the internet (auto-dialled) now has to be modified to know how to hang
up the connection? What if you have two programs using the connection at
the same time, and one of them decides to hang it up? Oops. Clearly not the
right solution.

F




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]