From 94c8ff1915712fb6fe00804ba618dac7633db432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Tue, 8 Sep 2020 17:17:48 +0200 Subject: [PATCH] kernelbase: Also pass CreateFile2 flags to CreateFileW. Instead of just attributes. Otherwise we may miss important flags like FILE_FLAG_OVERLAPPED and open the file for synchronous I/O, causing a deadlock in Flight Simulator. --- dlls/kernelbase/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index e022a29478e..4f30caaac7c 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -718,7 +718,7 @@ HANDLE WINAPI DECLSPEC_HOTPATCH CreateFile2( LPCWSTR name, DWORD access, DWORD s CREATEFILE2_EXTENDED_PARAMETERS *params ) { LPSECURITY_ATTRIBUTES sa = params ? params->lpSecurityAttributes : NULL; - DWORD attributes = params ? params->dwFileAttributes : 0; + DWORD attributes = params ? (params->dwFileAttributes | params->dwFileFlags) : 0; HANDLE template = params ? params->hTemplateFile : NULL; FIXME( "(%s %x %x %x %p), partial stub\n", debugstr_w(name), access, sharing, creation, params ); -- 2.28.0