Re: Subject: Re: Setup.exe

2003-01-08 Thread Abraham Backus
Along with IE/Windows wininet autodial apis, there's a message (I forget the
exact message ID right now though) that you can post to an invisible
autodial window periodically to tell it that we are busy and to not hang up.

There is also an api in shdocvw.dll "SetQueryNetSessionCount", which
increments, decrements, queries and returns the current session count, which
is used by autodial to decide when to hang up.

There are two aspects to autodial that can be configured via the Internet
Control Panel:
hang up when I'm finished or
hang up when I'm idle for n minutes

I have some code that does this and will see if I can't dig it up...

-Abe

- Original Message -
> 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.

--
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/




Re: Subject: Re: Setup.exe

2003-01-08 Thread Randall R Schulz
Fred,

At 10:39 2003-01-08, [EMAIL PROTECTED] wrote:


...

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.


I can speak only about Windows 2000, but you certainly can configure an 
idle time-out (hang-up) if you want. You can independently configure it to 
re-dial if the connection is dropped by the remote side.

My preferred configuration is to set a 5-minute idle disconnect, 
auto-redial on remote drop and check my mail every 5 minutes to keep the 
connection alive.

The only problem I have is that the auto-dial option (which is a 
system-wide or user-wide option set in the "Network and Dial-Up 
Connections" sub-folder of the Control Panels folder) sporadically turns it 
self off. More precisely, the system "spontaneously" (i.e., in response to 
some occurrence that is unknown to me and for which a pattern of occurrence 
cannot be discerned) enables the "Disable autodial for the current session 
(until I log off)" option in the "Dial-up Preferences" dialog. It's very 
annoying.


...

F



Randall Schulz 


--
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/



Subject: Re: Setup.exe

2003-01-08 Thread Fred_Smith




>

> Message-ID: <[EMAIL PROTECTED]>
> Date: Wed, 8 Jan 2003 17:24:22 - (GMT)
> Subject: Re: Setup.exe
> From: "Dave Hooper" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> 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/