fixed issue where it can't open handle for pipes created with PIPE_ACCESS_INBOUND

This commit is contained in:
Leonid Shagiev 2020-05-16 23:22:03 -05:00
parent a8c542bb91
commit 314083bbc3
1 changed files with 6 additions and 2 deletions

View File

@ -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));