Preventing Win Crash Messages


#1

Hi.

I decided to move the plug-in scanning module to a separate process (http://rawmaterialsoftware.com/viewtopic.php?f=8&t=7509).
It looks like it’s working fine. my problem now is that each time the scanning crashes I get the Windows message:
“PluginScanner has just stopped working…”

I did some searching and found that In addition to the try/catch I should also add this code:

#include <windows.h>

//...

SetErrorMode(SetErrorMode(0) | SEM_NOGPFAULTERRORBOX);
//or if you only care about Vista or newer:
//SetErrorMode(GetErrorMode() | SEM_NOGPFAULTERRORBOX);

I’m using the JuceApplication class.

My question is: What is the best way to integrate those lines in my code?

Thanks