Method for Monitoring URL activity- Restart IE whenever it has not gotten a new URL every 5 mins.


Go Back   Computer Help Articles > Internet Explorer 6
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-05-2006, 04:38 PM
Jim Mcduggan
 
Posts: n/a
Default Method for Monitoring URL activity- Restart IE whenever it has not gotten a new URL every 5 mins.

We have a C++ app that restarts IE if it dies, but we want to add 1 more
function and wonder the best way, if even possible to do it.

We would like to restart IE whenever it has not gotten a new URL every 5
mins. ( our screensaver page does a 3 min refresh, so if it has not
refreshed that url then either the net is down or IE is frozen).

So are there any system calls I can do from my win32 C++ app to figure our
if IE has had http activity within 5 mins?

Thanks
Jim


Reply With Quote
  #2  
Old 01-05-2006, 04:38 PM
Scherbina Vladimir
 
Posts: n/a
Default Re: Method for Monitoring URL activity- Restart IE whenever it has not gotten a new URL every 5 mins.

Writing BHO allows you to control all IE events. You can react on
BeforeNavigate, DocumentComplete, NavigateError and other events, make "time
estimations" and call *->Quit() if necessary.

The simplest solution for you is to save time to some variable in
DocumentComplete/BeforeNavigate handler, start some thread that calculates
how much time've passed since last DocumentComplete/BeforeNavigate was
invoked and close browser if that value is greater then 5 minutes.

BTW, this is not good idea - to close browser after some inactivity,
because user might change his local time and all his opened pages will
disappear...Maybe you should change your approach to the problem ?

--
Vladimir

"Jim Mcduggan" <spam@spammer.com> wrote in message
news:%23zHS2PKEGHA.2320@TK2MSFTNGP11.phx.gbl...
> We have a C++ app that restarts IE if it dies, but we want to add 1 more
> function and wonder the best way, if even possible to do it.
>
> We would like to restart IE whenever it has not gotten a new URL every 5
> mins. ( our screensaver page does a 3 min refresh, so if it has not
> refreshed that url then either the net is down or IE is frozen).
>
> So are there any system calls I can do from my win32 C++ app to figure our
> if IE has had http activity within 5 mins?
>
> Thanks
> Jim
>
>



Reply With Quote
  #3  
Old 01-05-2006, 04:38 PM
Jim Mcduggan
 
Posts: n/a
Default Re: Method for Monitoring URL activity- Restart IE whenever it has not gotten a new URL every 5 mins.

Good suggestion Vladimir.
The machine is a Kiosk, so we are not worried about the time changing.
Can we write a BHO inside our c++ .exe daemon application or does it have to
be it's own file/application?
Is there any other way than a BHO, maybe even at the winsock layer?


"Scherbina Vladimir" <vladimir.scherbina@gmail.com> wrote in message
news:%239ZL4JREGHA.3052@TK2MSFTNGP10.phx.gbl...
> Writing BHO allows you to control all IE events. You can react on
> BeforeNavigate, DocumentComplete, NavigateError and other events, make

"time
> estimations" and call *->Quit() if necessary.
>
> The simplest solution for you is to save time to some variable in
> DocumentComplete/BeforeNavigate handler, start some thread that calculates
> how much time've passed since last DocumentComplete/BeforeNavigate was
> invoked and close browser if that value is greater then 5 minutes.
>
> BTW, this is not good idea - to close browser after some inactivity,
> because user might change his local time and all his opened pages will
> disappear...Maybe you should change your approach to the problem ?
>
> --
> Vladimir
>
> "Jim Mcduggan" <spam@spammer.com> wrote in message
> news:%23zHS2PKEGHA.2320@TK2MSFTNGP11.phx.gbl...
> > We have a C++ app that restarts IE if it dies, but we want to add 1 more
> > function and wonder the best way, if even possible to do it.
> >
> > We would like to restart IE whenever it has not gotten a new URL every 5
> > mins. ( our screensaver page does a 3 min refresh, so if it has not
> > refreshed that url then either the net is down or IE is frozen).
> >
> > So are there any system calls I can do from my win32 C++ app to figure

our
> > if IE has had http activity within 5 mins?
> >
> > Thanks
> > Jim
> >
> >

>
>



Reply With Quote
  #4  
Old 01-05-2006, 04:38 PM
Scherbina Vladimir
 
Posts: n/a
Default Re: Method for Monitoring URL activity- Restart IE whenever it has not gotten a new URL every 5 mins.

"Jim Mcduggan" <spam@spammer.com> wrote in message
news:%23k4d%23DWEGHA.1384@TK2MSFTNGP11.phx.gbl...
> Good suggestion Vladimir.
> The machine is a Kiosk, so we are not worried about the time changing.
> Can we write a BHO inside our c++ .exe daemon application or does it have
> to
> be it's own file/application?
> Is there any other way than a BHO, maybe even at the winsock layer?



Sorry, I know nothing about Kiosk (btw, in russian it has interesting
meaning, not connected with computers at all ), but you may implement BHO
(its inproc COM component that is represented as DLL) that will be
communicating with your *.exe application (if necessary) using IPC.

Note, that this is win32 specific techinque. For more information read this
article:
http://msdn.microsoft.com/library/de...n/html/bho.asp
(Browser Helper Objects: The Browser the Way You Want It).

As for another ways: there is no another documented way to detect that
browser is idle. Sure, you may write driver (or LSP, etc) that intercepts
network packets, or hook windows messages, or enumerate ShellWindows items,
retrieving items path, and then make comparisons whenether it changed for
last 5 minutes, etc... but all those approaches are overheat.

--
Vladimir


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT. The time now is 02:08 AM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. SEO by vBSEO 2.3.2 © 2005, Crawlability, Inc.

Method for Monitoring URL activity- Restart IE whenever it has not gotten a new URL every 5 mins.