473,779 Members | 2,016 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#?
Jul 21 '05 #1
2 1666
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#?

Jul 21 '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#?

Jul 21 '05 #3

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

Similar topics

5
12593
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...
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...
2
3709
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#?
5
3647
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
9636
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
10306
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
10074
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,...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
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
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
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
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.