hard technical questions: com automation, IE, killing applications

  • Thread starter Thread starter RJB
  • Start date Start date
R

RJB

I'm working on a VB application that must run 24x7 for a LONG time,
think 60 days of so. As part of what it does it must automate an
instance of IE and navigate to many different URLs, think many
thousands.

Issue 1: Most of the time, these navigations succeed. All is well.
But, based on early runs, from time to time, say once or twice every
24 hrs IE inexplicably hangs and the automation object hangs, gets
stuck, becomes nonresponsive, etc. for whatever reason. I'm not sure
why, and ultimately don't even need to know/care, but it does happen.
The application has a thread that detects this event reliably. The
question is, how can I kill the instance of IE that has become
unresponsive? I need an approach that kills, no matter what. BTW,
experience indicates that leaving hung copies of IE laying about
eventually leads to vary bad behavior by other copies of IE.

Issue 2: Some of the sites, some of the time, create a popup window.
I can detect this occurrence by catching IE.NewWindow. Testing
indicates that when there are a few popup windows displayed the main
IE window is happy to continue to work. However, when there are many,
say 10s or 100s, IE becomes very distressed, performance becomes
variable, hangs occur, etc. How can I kill these popup windows after I
catch them in NewWindow?

Issue 3: Re Issue 2. From time to time, I will need to do something
with the popup window, as in, for example, save it. When NewWindow
fires, experimentation indicates that the window is NOT complete in
that the document object is not referencable. I know how to determine
that a url is in fact fully displayed using IE.DocumentComplete. I'm
not clear on how to attach events to the popup, wait for the popup to
become complete, trigger a SAVEAS, and then kill the popup window.
Any clues?

Issue 4: I'd like to be able to do other things while this application
is running, including using IE. I know how to get a list of all the
IEs that are currently running on the system. I know the one my
application started with New Internet.Explorer. How can I tell mine
from the rest? What about when my application's IE caused some
popups? How can I know that they are a consequence of my
application's IE?

Thanks for any help.
Richard
 
Hi RJB,

If I read this I think that you have not used the AXwebbrowser but reusing
IE, if that is so, try to use the AXwebbrowser in your application, than you
know which it is. It is than also probably more easy to use more events as
by instance the error events from the axwebbrowser.

For a lot of otherthings I am also very curious how to do that. But when you
use the Axwebbrowser, you can do a lot to prevent that by using events as
errors and that.

I hope you get a lot of answers.

:-)

I hope this helps even as it is a little bit?

Cor
 
Cor,

Thanks for the response. You are in fact correct that I've
instantiated IE and am not using the AXwebbrowser control as it is not
appropriate for reasons largely outside the technology. I would be
concerned, at any case, that a hang within the control would be even
more difficult to deal with. Experimentation demonstrates with
certainty that on the order of a few 10s of hours the IE object
(regardless of where it is instantiated) will hand and will have to be
destroyed and restarted. A great sadness, but unfortunately, at least
in my experience, a truth that I must now deal with.
 
Back
Top