From 0f88b16395a380726932bb86811836b44332b1b6 Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Thu, 14 Sep 2023 03:00:35 +0100 Subject: [PATCH] [*] d0538ea4 cont support for CreateFile2W if required --- Source/AuProcAddresses.NT.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/AuProcAddresses.NT.cpp b/Source/AuProcAddresses.NT.cpp index efbce8fd..d0b83876 100644 --- a/Source/AuProcAddresses.NT.cpp +++ b/Source/AuProcAddresses.NT.cpp @@ -352,7 +352,7 @@ namespace Aurora if (pCreateFile2W) { _CREATEFILE2_EXTENDED_PARAMETERS params {}; - bool bWrite {}; + bool bRead {}; HANDLE hHandle {}; params.dwSize = sizeof(_CREATEFILE2_EXTENDED_PARAMETERS); @@ -360,11 +360,11 @@ namespace Aurora params.dwFileAttributes = dwAttributes; params.lpSecurityAttributes = &attrs; - if ((bWrite = (::wcscmp(lpFileName, L"CONIN$") == 0))|| - ::wcscmp(lpFileName, L"CONOUT$") == 0 || - ::wcscmp(lpFileName, L"CONERR$") == 0) + if ((bRead = (::wcscmp(lpFileName, L"CONIN$") == 0)) || + (::wcscmp(lpFileName, L"CONOUT$") == 0) || + (::wcscmp(lpFileName, L"CONERR$") == 0)) { - if (bWrite) + if (!bRead) { dwDesiredAccess = GENERIC_READ | GENERIC_WRITE; }