소스 검색

avoid dialog boxes on dll loading errors for windows

git-svn-id: trunk@6569 -
pierre 18 년 전
부모
커밋
ffc571cd41
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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;