473,321 Members | 1,667 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Detecting a external application crashing

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#?
Jul 21 '05 #1
2 1638
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: gu*******@net-kraft.com
____________________________________________
"Mr.Tickle" <Mr******@mrmen.com> wrote in message
news:Ob**************@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#?

Jul 21 '05 #2
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...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/
----------------------------------------------------------------------------
-------

"Mr.Tickle" <Mr******@mrmen.com> wrote in message
news:Ob**************@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#?

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jole | last post by:
Hi I'm writing a program that needs to read from a file. In order for the program to be robust, it should somehow check that the file isn't corrupt, or stuffed in any way. For example, that...
10
by: Frances Del Rio | last post by:
pls, why is this not working? <SCRIPT language=JavaScript type="text/javascript"> var br = '<SCRIPT language=Javascript' br += 'src="js_pop.js" type="text/javascript">' br += '</SCRIPT>' var...
1
by: Unregistered | last post by:
I'm making an Intranet site for someone who is not very familiar wit making websites, thus I would like to make it as simple as possible fo her when she needs to update it. The intranet site...
5
by: VinnieT | last post by:
I have a load balanced system that consists of 3 production servers. There are about 20 different applications that are used on these boxes. One of my applications in particular is used more than...
2
by: Mr.Tickle | last post by:
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...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
1
by: Phill W. | last post by:
Is there any way for a Form to detect that it has a Modal dialog displayed "above" it and to get hold of a reference with which to manipulate that dialog? I have a Windows Forms application that...
4
by: Diego Martins | last post by:
Hi all! I am doing a crude investigation of memory leaks in objects created by external libraries. Since I don't have access to the source code, I can't tell if an object are freeing its resources...
5
by: xoinki | last post by:
hi all, I have a very general question.. My program is crashing in a window procedure... the sample code is as follows.. return CallWindowProc(pccustgrid->m_wporiglistwndproc, hwnd,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.