473,790 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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#?
Nov 15 '05 #1
2 3709
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******** ******@TK2MSFTN GP10.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#?

Nov 15 '05 #2
Hi!

Under Windows NT architecture, one can catch application wide unhandled
exceptions by using SetUnhandledExc eptionHandler 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******** ******@TK2MSFTN GP10.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#?

Nov 15 '05 #3

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

Similar topics

5
12597
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 file may have been created but a crash occurred at that point in time (while it was being created), damaging the file. Now, my program which needs to read from this file, should first check that it's in good condition, and that it hasn't been...
10
4122
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 op = '<SCRIPT language=Javascript' op += 'src="js_pop-op.js" type="text/javascript">' op += '</SCRIPT>' if (navigator.userAgent.indexOf('Opera') != -1 ) {
1
3062
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 uses frames - one menu frame that is always present and one frame into which the content is loaded. The intranet sit features many, many links to both internal and external pages - i internal pages within the intranet and external pages on the...
2
1667
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 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#?
1
2211
by: Adam Hearn | last post by:
Sorry if this difficult to understand but I'm pulling my hair out and could do with some good ideas please... I've developed an application which in .NET as a Windows service which is simply crashing but with no signs/details on where the crash is occuring. Please not that the crash is happening on the server and only when the server is running on a Win2K3 host. App is developed as an N-Tier app (client-processing-processing-data) with...
5
4662
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 the others. Since updating 2 applications, I have had problems on the event log of the servers, following stopping of the aspnet_ws.exe process. Something is causing the following error in the windows application event log: The description for...
5
3648
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 New System.Diagnostics.Process 'p.Start(MDEPDirStr & "macrun.exe", sPPTOut) p.Start("C:\WINDOWS\SYSTEM32\CALC.EXE") 'p.Start("C:\WINDOWS\SYSTEM32\macrun.exe", sPPTOut)
1
1163
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 can display several dialogs (custom Forms contained in an external assembly - all my own code). I'd like to be able to shut the application down remotely (say, at lunch time in our Development environment so that updates can be released). ...
4
1671
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 properly during destruction. For now, I need a portable function that can tell me the available free store memory. With that, I can do things like: size_t mem = getFreeStoreAvailable(); {
5
1965
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, message, wparam, lparam); this is a window procedure for a listbox.. sometimes it is crashing while editing the listbox.. actually this listbox is a part of customized grid.. if a user presses tab then he can navigate thru the grid.. and edit.
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9512
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10413
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10145
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9986
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9021
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4094
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.