[ADVAPI32_WINETEST] Sync with Wine Staging 2.9. CORE-13362
[reactos.git] / rostests / rosautotest / CPipe.h
1 /*
2 * PROJECT: ReactOS Automatic Testing Utility
3 * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
4 * PURPOSE: Class that managed 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 };