Groups | Blog | Home
all groups > dotnet general > september 2003 >

dotnet general : Detecting a external application crashing


Mr.Tickle
9/15/2003 9:57:01 PM
Is it possible to determine when and what application crashed from within C#
?

I want to send data over UDP to an application socket, and after that I want
to determine whether its crashed or not and decide what to do next, like
report the crash etc.and stop sending (AV'd etc), is this easy to do on
C#?

Gurudev
9/16/2003 3:13:08 PM
you can check whether an application crashed or not only if you created that
application in your process, in that case you can check for its exit code
and if it is other than zero, then it crashed, you can also check for its
error by redirecting its output to your process..

--
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Gurudev
Software Engineer, NetKraft,
Bangalore, India.
e-me: gurudev.p@net-kraft.com
____________________________________________
[quoted text, click to view]

Kumar Gaurav Khanna [.NET MVP]
9/25/2003 5:00:43 PM
Hi!

Under Windows NT architecture, one can catch application wide unhandled
exceptions by using SetUnhandledExceptionHandler Win32 API. This can be
easily extended to catch system wide exceptions for USER32.DLL using
applications using the AppInit_DLLs registry setting:

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q197/5/71.asp&NoWebContent=1

Regards,
Kumar Gaurav Khanna

--
----------------------------------------------------------------------------
-------
I can't be garbage collected; I am pinned to .NET
----------------------------------------------------------------------------
-------
Microsoft MVP - .NET
WinToolZone - http://www.wintoolzone.com/
Spelunking Microsoft Technologies and my home on the web :-)
OpSupport - Spelunking Rotor
http://opsupport.sscli.net/

http://dot-net.blogspot.com/
http://kgk.blogspot.com/
----------------------------------------------------------------------------
-------

[quoted text, click to view]

AddThis Social Bookmark Button