www.digitalmars.com         C & C++   DMDScript  

c++ - Exception handling

reply "Heinz-Peter Nuettgens" <hnuettgens t-online.de> writes:
First I'm not experienced in that theme, but I'm looking for a way to handle
system crashes due to illegal pointers, division by zero or something like
this. I want to avoid "blue screen" and handle the error by myself, i.e at
least shut down my application.

My application uses standard C code without any MFC stuff.

I tried some exception handling with __except, __finally but I didn't get it
work like I planned.

If there is anyone, who can give me a few hints, how to realize it in DMC, I
would be pleased.

Greetings

Heinz-Peter
Mar 21 2003
parent reply "Nic Tiger" <nictiger progtech.ru> writes:
For that reason (avoiding blue-screens and on-fly problem resolution, such
as writing to primary video surface when its address is changed) I used
Win32 API function, namely SetUnhandledExceptionFilter.

Nic Tiger.

"Heinz-Peter Nuettgens" <hnuettgens t-online.de> сообщил/сообщила в новостях
следующее: news:b5g03u$16bg$1 digitaldaemon.com...
 First I'm not experienced in that theme, but I'm looking for a way to

 system crashes due to illegal pointers, division by zero or something like
 this. I want to avoid "blue screen" and handle the error by myself, i.e at
 least shut down my application.

 My application uses standard C code without any MFC stuff.

 I tried some exception handling with __except, __finally but I didn't get

 work like I planned.

 If there is anyone, who can give me a few hints, how to realize it in DMC,

 would be pleased.

 Greetings

 Heinz-Peter

Mar 21 2003
parent "Heinz-Peter Nuettgens" <hnuettgens t-online.de> writes:
Thanks a lot,

that helped. I think this function may help to solve my problem.

Heinz-Peter

"Nic Tiger" <nictiger progtech.ru> schrieb im Newsbeitrag
news:b5g6he$1ba9$1 digitaldaemon.com...
 For that reason (avoiding blue-screens and on-fly problem resolution, such
 as writing to primary video surface when its address is changed) I used
 Win32 API function, namely SetUnhandledExceptionFilter.

 Nic Tiger.

Mar 23 2003