1 /*
2  * PROJECT:     ReactOS Automatic Testing Utility
3  * LICENSE:     GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE:     Class that manages an unidirectional anonymous byte stream pipe
5  * COPYRIGHT:   Copyright 2015 Thomas Faber (thomas.faber@reactos.org)
6  */
7 
8 class CPipe
9 {
10 private:
11     HANDLE m_hReadPipe;
12     HANDLE m_hWritePipe;
13 
14 public:
15     CPipe();
16     ~CPipe();
17 
18     void CloseReadPipe();
19     void CloseWritePipe();
20 
21     bool Peek(PVOID Buffer, DWORD BufferSize, PDWORD BytesRead, PDWORD TotalBytesAvailable);
22     bool Read(PVOID Buffer, DWORD NumberOfBytesToRead, PDWORD NumberOfBytesRead);
23     bool Write(LPCVOID Buffer, DWORD NumberOfBytesToWrite, PDWORD NumberOfBytesWritten);
24 
25     friend class CPipedProcess;
26 };
27