There are several criteria. In general, unhandled exceptions are the top killer. There are other errors, but they get pretty technical.
Two, an application becomes unresponsive if messages dispatched to it are not retrieved. Windows attaches a timer to messages to each application. If it is not handled, then that's when you get the unresponsive message.
Three, applications can also explicitly tell Windows to kill the application process give certain non fatal errors. Often this is to prevent data corruption.
Which program is it that hangs?
edit:
Aparently, there is a way to turn this off. By coincidence, I was reading the perfmon team blog and ran into this article. It give steps to explicitly turn off "ghosting" for an application. I'll cut and paste the steps also.
To download the Application Compatibility Toolkit, visit the following
Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/aa286552.aspx
To create a custom Application Compatibility database:
Install and run the Compatibility Administrator Tool.
Right-click Custom Database, and then click New.
Right-click the new database, and then click Rename.
Type noghost as the name of the database. (You can name this
whatever you want.)
Right-click New Database, click Create New, and then click
Application Fix. Type the name of the program to be fixed.
Type the name of the program manufacturer.
Locate and then select the appropriate program (.exe) file.
Click Next.
In the Compatibility Modes window, click None, and then click Next.
In the Compatibility Fixes list, click NoGhost.
Click either Test Run or Finish. Clicking Test Run starts the
program with the application compatibility setting. Clicking Finish
adds the compatibility fix to your database.
On the File menu, click Save to save the database. Or, copy the
database to the C:\Windows\AppPatch folder.
Right-click the database, and then click Install. Or, run the
sdbinst c:\windows\apppatch\noghost.sdb -q command to install the
database.
I verified the steps myself. . .
Title does not match question. Consider revising one or both for accuracy.
;-)
– Synetech – 2011-07-18T00:38:51.520Done! Any other suggestions? – surfasb – 2011-07-18T01:39:59.153
That’s not what I meant. The title is asking how to prevent Windows from doing something while the question is asking for information about how something works. – Synetech – 2011-07-18T01:46:33.620