소스 검색

inject-helper: Set error mode to SEM_FAILCRITICALERRORS

This prevents spurious dialog boxes appearing, such as "No disk is in the
drive" if the application attempts to access an invalid drive.
Richard Stanway 8 년 전
부모
커밋
20cc8e6ab7
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      plugins/win-capture/inject-helper/inject-helper.c

+ 1 - 0
plugins/win-capture/inject-helper/inject-helper.c

@@ -101,6 +101,7 @@ int main(int argc, char *argv_ansi[])
 	LPWSTR *argv;
 	int ret = INJECT_ERROR_INVALID_PARAMS;
 
+	SetErrorMode(SEM_FAILCRITICALERRORS);
 	load_debug_privilege();
 
 	pCommandLineW = GetCommandLineW();