From: Tom on
If a serve(2003) is setup to handle exceptions in programs via
drwtsn32 is it possible to program around this setting. So that if I
have a service which runs some exception prone programs, which happen
to be in C++, can I override this programmaticly or must I make the
registry change for the whole server.

Thanks for any help,
Tom
From: Kerem Gümrükcü on
Hi,

the Dr. Watson settings are made in the Registry.
Read this: http://support.microsoft.com/kb/188296
It is the AeDebug Key that is the main target for
post mortem debuggers and exception handlers
like Dr. Watson.

Remember: No software is error safe, so you should
install some kind of exception handler, at least some
that could silently but cleanly handle the exception!

Regards

Kerem

--
-----------------------
Beste Gr�sse / Best regards / Votre bien devoue
Kerem G�mr�kc�
Latest Project: http://www.pro-it-education.de/software/deviceremover
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------

"Tom" <depkefamily(a)gmail.com> schrieb im Newsbeitrag
news:27edbbb2-4eee-488f-aa6a-14cbfd2d677f(a)o30g2000yqb.googlegroups.com...
> If a serve(2003) is setup to handle exceptions in programs via
> drwtsn32 is it possible to program around this setting. So that if I
> have a service which runs some exception prone programs, which happen
> to be in C++, can I override this programmaticly or must I make the
> registry change for the whole server.
>
> Thanks for any help,
> Tom

From: Tom on
On Mar 1, 10:00 am, Kerem Gümrükcü <kareem...(a)hotmail.com> wrote:
> Hi,
>
> the Dr. Watson settings are made in the Registry.
> Read this:http://support.microsoft.com/kb/188296
> It is the AeDebug Key that is the main target for
> post mortem debuggers and exception handlers
> like Dr. Watson.
>
> Remember: No software is error safe, so you should
> install some kind of exception handler, at least some
> that could silently but cleanly handle the exception!

Yes I know about the registry setting. But am looking to see
if I can handling this in the service code rather than making the
change in the registry. I have more control over the
C# service which spawns off the exception prone programs.
From: Kerem Gümrükcü on
Hi Tom,

> I have more control over the
> C# service which spawns off the exception prone programs.

There is a big difference on some code failing inside
a try/catch/finally construct in managed code and a
application faling at os level. If the application fails, then for
some reason that is not handeled inside the process
address space of the faling application. There is no way
in controling this with C# code constructs. But you can
start the application with CreateProcess(...) and flags
DEBUG_PROCESS/DEBUG_ONLY_THIS_PROCESS, then
you have full control on the process in the case it
fails,....

Start here:

[About Basic Debugging]
http://msdn.microsoft.com/en-us/library/ms679266%28VS.85%29.aspx

Regards

Kerem

--
-----------------------
Beste Gr�sse / Best regards / Votre bien devoue
Kerem G�mr�kc�
Latest Project: http://www.pro-it-education.de/software/deviceremover
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------

"Tom" <depkefamily(a)gmail.com> schrieb im Newsbeitrag
news:61112014-fb23-4a64-b31a-19a76a45efc6(a)15g2000yqa.googlegroups.com...
> On Mar 1, 10:00 am, Kerem G�mr�kc� <kareem...(a)hotmail.com> wrote:
>> Hi,
>>
>> the Dr. Watson settings are made in the Registry.
>> Read this:http://support.microsoft.com/kb/188296
>> It is the AeDebug Key that is the main target for
>> post mortem debuggers and exception handlers
>> like Dr. Watson.
>>
>> Remember: No software is error safe, so you should
>> install some kind of exception handler, at least some
>> that could silently but cleanly handle the exception!
>
> Yes I know about the registry setting. But am looking to see
> if I can handling this in the service code rather than making the
> change in the registry. I have more control over the
> C# service which spawns off the exception prone programs.

From: Nobody on
Besides what others suggested, see SetErrorMode() function.