From 314083bbc3751a650bb115c4682b8a151151e6f1 Mon Sep 17 00:00:00 2001 From: Leonid Shagiev Date: Sat, 16 May 2020 23:22:03 -0500 Subject: [PATCH] fixed issue where it can't open handle for pipes created with PIPE_ACCESS_INBOUND --- Source/WinObjEx64/extras/extrasIPC.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/WinObjEx64/extras/extrasIPC.c b/Source/WinObjEx64/extras/extrasIPC.c index 42673b5..332c532 100644 --- a/Source/WinObjEx64/extras/extrasIPC.c +++ b/Source/WinObjEx64/extras/extrasIPC.c @@ -291,8 +291,12 @@ VOID IpcPipeQueryInfo( //open pipe hPipe = NULL; if (!IpcOpenObjectMethod(Context, &hPipe, GENERIC_READ)) { - IpcDisplayError(hwndDlg, IpcModeNamedPipes); - return; + + // for pipes created with PIPE_ACCESS_INBOUND open mode https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createnamedpipea + if (!IpcOpenObjectMethod(Context, &hPipe, GENERIC_WRITE | FILE_READ_ATTRIBUTES)) { + IpcDisplayError(hwndDlg, IpcModeNamedPipes); + return; + } } RtlSecureZeroMemory(&fpli, sizeof(fpli));