Suppressing plugin errors while scanning (Win)


#1

Hi.

While scanning, some plugins cause error messages to pop, which stop my scanning process.
I tried to suppress them with SetErrorMode(), but without success.
Maybe it has to do with SetErrorMode() and LoadLibrary issues…
Does anybody know how to achieve this?

This is how I wrapped the DLL call in the juce_VSTPluginFormat:

#ifdef JUCE_WINDOWS
				// GetErrorMode() only exists on Vista and higher,
				// call SetErrorMode() twice to achieve the same effect.
				UINT oldErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
				SetErrorMode(oldErrorMode | SEM_FAILCRITICALERRORS);
#endif

				 effect = module->moduleMain (&audioMaster);

#ifdef JUCE_WINDOWS
				// Restore previous error mode.
				SetErrorMode(oldErrorMode);
#endif

Thanks