Author: mturk Date: Wed Apr 22 12:33:45 2009 New Revision: 767488 URL: http://svn.apache.org/viewvc?rev=767488&view=rev Log: GetErrorMode exists only on Vista+.
Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c?rev=767488&r1=767487&r2=767488&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c Wed Apr 22 12:33:45 2009 @@ -285,6 +285,7 @@ /* Called by the JVM when ACR is loaded */ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { + UINT em; DWORD rc; JNIEnv *env; void *epp; @@ -326,7 +327,8 @@ /* Do not display file not found messge boxes. * Return the error to the application instead */ - SetErrorMode(GetErrorMode() | SEM_NOOPENFILEERRORBOX); + em = SetErrorMode(0); + SetErrorMode( em | SEM_NOOPENFILEERRORBOX); return JNI_VERSION_1_4; }