Explorar o código

avoid dialog boxes on dll loading errors for windows

git-svn-id: trunk@6569 -
pierre %!s(int64=18) %!d(string=hai) anos
pai
achega
ffc571cd41
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      tests/utils/redir.pp

+ 3 - 0
tests/utils/redir.pp

@@ -983,6 +983,8 @@ end;
   {$ifdef win32}
     StoreInherit:=ExecInheritsHandles;
     ExecInheritsHandles:=true;
+    { Avoid dialog boxes if dll loading fails }
+    SetErrorMode(SEM_FAILCRITICALERRORS);
   {$endif win32}
     DosError:=0;
     If UseComSpec then
@@ -1000,6 +1002,7 @@ end;
       end;
   {$ifdef win32}
     ExecInheritsHandles:=StoreInherit;
+    SetErrorMode(0);
   {$endif win32}
     IOStatus:=DosError;
     ExecuteResult:=DosExitCode;