[*] d0538ea4 cont support for CreateFile2W if required

This commit is contained in:
Reece Wilson 2023-09-14 03:00:35 +01:00
parent db8db7b0cc
commit 0f88b16395

View File

@ -352,7 +352,7 @@ namespace Aurora
if (pCreateFile2W) if (pCreateFile2W)
{ {
_CREATEFILE2_EXTENDED_PARAMETERS params {}; _CREATEFILE2_EXTENDED_PARAMETERS params {};
bool bWrite {}; bool bRead {};
HANDLE hHandle {}; HANDLE hHandle {};
params.dwSize = sizeof(_CREATEFILE2_EXTENDED_PARAMETERS); params.dwSize = sizeof(_CREATEFILE2_EXTENDED_PARAMETERS);
@ -360,11 +360,11 @@ namespace Aurora
params.dwFileAttributes = dwAttributes; params.dwFileAttributes = dwAttributes;
params.lpSecurityAttributes = &attrs; params.lpSecurityAttributes = &attrs;
if ((bWrite = (::wcscmp(lpFileName, L"CONIN$") == 0))|| if ((bRead = (::wcscmp(lpFileName, L"CONIN$") == 0)) ||
::wcscmp(lpFileName, L"CONOUT$") == 0 || (::wcscmp(lpFileName, L"CONOUT$") == 0) ||
::wcscmp(lpFileName, L"CONERR$") == 0) (::wcscmp(lpFileName, L"CONERR$") == 0))
{ {
if (bWrite) if (!bRead)
{ {
dwDesiredAccess = GENERIC_READ | GENERIC_WRITE; dwDesiredAccess = GENERIC_READ | GENERIC_WRITE;
} }