[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Detecting a external application crashing

Mr.Tickle

9/15/2003 7:57:00 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#?


2 Answers

Gurudev

9/16/2003 9:43:00 AM

0

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
____________________________________________
"Mr.Tickle" <MrTickle@mrmen.com> wrote in message
news:Ob$GYK8eDHA.2184@TK2MSFTNGP10.phx.gbl...
> 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#?
>
>


Kumar Gaurav Khanna

9/25/2003 11:31:00 AM

0

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&NoWe...

Regards,
Kumar Gaurav Khanna

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

http://dot-net.blo...
http://kgk.blo...
----------------------------------------------------------------------------
-------

"Mr.Tickle" <MrTickle@mrmen.com> wrote in message
news:Ob$GYK8eDHA.2184@TK2MSFTNGP10.phx.gbl...
> 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#?
>
>