Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

How to catch native WIN NT exceptions?

I would like to catch a specific WIN NT exception within the code. How can it be done? I don't want to use the (...) notation, because I want all other exceptions to continue propogating on all levels. The specific exception number is 0xE06D7363. (I'm almost sure it's a WIN NT specific exception). Thanks!
0
orend
Asked:
orend
1 Solution
 
Roshan DavisCommented:
Have you tried __try, __except /__try , __finally

Roshmon
0
 
orendAuthor Commented:
There's an unwritten law we shouldn't use code dealing specifically with NT... is there another way to catch it?
0
 
orendAuthor Commented:
There's an unwritten law we shouldn't use code dealing specifically with NT... is there another way to catch it?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
orendAuthor Commented:
There's an unwritten law we shouldn't use code dealing specifically with NT... is there another way to catch it?
0
 
orendAuthor Commented:
Err... sorry for the multiple postings.
0
 
jhanceCommented:
Hmmm, I think your "unwritten law" is questionable in the context of this problem.

You want to catch a "specific Windows NT" exception but you don't want to use "code dealing specifically with NT" to do it.  Sounds like a "Catch-22".

The way to get at any and all exceptions (other than DEVICE DRIVER / BSOD faults) is via the SetUnhandledExceptionFilter WIN32 API.  Here you have complete access to anything that happens before Windows displays a problem or starts a debugger.

Unfortunately for you, this is Windows specific.  I know of no way in C++ to catch all Windows NT exceptions.
0
 
jkrCommented:
>>The specific exception number is 0xE06D7363.
>>(I'm almost sure it's a WIN NT specific exception).

This is a "Microsoft C++ exception" - see http://support.microsoft.com/default.aspx?scid=kb;EN-US;q185294 ("PRB: Exception Code 0xE06D7363 When Calling Win32 SEH APIs (Q185294)") and http://msdn.microsoft.com/code/default.asp?url=/msdn-files/026/002/136/BugslayerUtil/Source%20Files/CrashHandler_cpp.asp on how to catch tha. It seems that you will have to break an 'unwritten law' that is IMHO stupid - if you have to deal with platform specific exceptions, use platform specific code.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now