ReactOS  0.4.14-dev-1338-g0d187f7
CPipe.h
Go to the documentation of this file.
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  * Copyright 2019 Colin Finck (colin@reactos.org)
7  */
8 
9 class CPipe
10 {
11 private:
13 
17 
18 public:
19  CPipe();
20  ~CPipe();
21 
22  void CloseReadPipe();
23  void CloseWritePipe();
24 
25  bool Peek(PVOID Buffer, DWORD BufferSize, PDWORD BytesRead, PDWORD TotalBytesAvailable);
26  DWORD Read(PVOID Buffer, DWORD NumberOfBytesToRead, PDWORD NumberOfBytesRead, DWORD TimeoutMilliseconds);
27  bool Write(LPCVOID Buffer, DWORD NumberOfBytesToWrite, PDWORD NumberOfBytesWritten);
28 
29  friend class CPipedProcess;
30 };
CPipe()
Definition: CPipe.cpp:17
Definition: CPipe.h:9
void CloseReadPipe()
Definition: CPipe.cpp:86
long LONG
Definition: pedump.c:60
void CloseWritePipe()
Definition: CPipe.cpp:98
Definition: bufpool.h:45
DWORD Read(PVOID Buffer, DWORD NumberOfBytesToRead, PDWORD NumberOfBytesRead, DWORD TimeoutMilliseconds)
Definition: CPipe.cpp:160
OVERLAPPED m_ReadOverlapped
Definition: CPipe.h:14
#define BufferSize
Definition: classpnp.h:419
unsigned long DWORD
Definition: ntddk_ex.h:95
static LONG m_lPipeCount
Definition: CPipe.h:12
bool Peek(PVOID Buffer, DWORD BufferSize, PDWORD BytesRead, PDWORD TotalBytesAvailable)
Definition: CPipe.cpp:129
bool Write(LPCVOID Buffer, DWORD NumberOfBytesToWrite, PDWORD NumberOfBytesWritten)
Definition: CPipe.cpp:232
HANDLE m_hReadPipe
Definition: CPipe.h:15
DWORD * PDWORD
Definition: pedump.c:68
HANDLE m_hWritePipe
Definition: CPipe.h:16
CONST void * LPCVOID
Definition: windef.h:191
~CPipe()
Definition: CPipe.cpp:74
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ FLT_IO_OPERATION_FLAGS _Out_opt_ PULONG BytesRead
Definition: fltkernel.h:1255