[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

disable crash screen

Posted on 2011-10-28
5
Medium Priority
?
376 Views
Last Modified: 2012-05-12
I use a dll that sometimes crashes therefore I use the dll in a separate process.

However when extra process crashes it displays a screen with "... has encountered a problem and needs to close"

I would like to disable this window

I have allready tried

1. WerAddExcludedApplication
this removes the "upload information to microsoft" button, but a crash screen is still displayed

2.
__try {...dll crashes...]
__except (EXCEPTION_EXECUTE_HANDLER)
{}

3.
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);

However a crash screen is still displayed - it seems that the dll fails with an exception that I am not able to catch
0
Comment
Question by:pindemad2
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 37046124
If that's a C++ exception, the runtime exception handler might kick in. Instead of only using the SEH frame, also add a C++ handler frame, e.g.
void entry_point_for_actual_code() {

  // actual code goes here
}

void cpp_frame() {

  try {

    entry_point_for_actual_code();
  }
  catch(...) {

  }
}

void SEH_frame() {

     __try {

        cpp_frame();

      } __except(1) {

      }
}

int main () {

  SEH_frame();

  return 0;
}

Open in new window

0
 

Author Comment

by:pindemad2
ID: 37056055
The problem is that I cannot catch the exception, the process terminates with a crash screen instead of going into the exception catch handler.
0
 
LVL 86

Expert Comment

by:jkr
ID: 37072397
Have you tried the above?
0
 
LVL 40

Expert Comment

by:evilrix
ID: 37419299
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question