21 SecurityAttributes.
nLength =
sizeof(SecurityAttributes);
32 const DWORD dwDefaultBufferSize = 4096;
33 const DWORD dwDefaultTimeoutMilliseconds = 120000;
41 dwDefaultTimeoutMilliseconds,
45 FATAL(
"CreateNamedPipe failed\n");
59 FATAL(
"CreateFileW failed\n");
67 FATAL(
"CreateEvent failed\n");
89 FATAL(
"Trying to close already closed read pipe\n");
101 FATAL(
"Trying to close already closed write pipe\n");
132 FATAL(
"Trying to peek from a closed read pipe\n");
164 FATAL(
"Trying to read from a closed read pipe\n");
196 FATAL(
"GetOverlappedResult failed\n");
235 FATAL(
"Trying to write to a closed write pipe\n");
#define InterlockedIncrement
bool Write(LPCVOID Buffer, DWORD NumberOfBytesToWrite, PDWORD NumberOfBytesWritten)
DWORD Read(PVOID Buffer, DWORD NumberOfBytesToRead, PDWORD NumberOfBytesRead, DWORD TimeoutMilliseconds)
bool Peek(PVOID Buffer, DWORD BufferSize, PDWORD BytesRead, PDWORD TotalBytesAvailable)
OVERLAPPED m_ReadOverlapped
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
#define FILE_FLAG_OVERLAPPED
BOOL WINAPI PeekNamedPipe(HANDLE hNamedPipe, LPVOID lpBuffer, DWORD nBufferSize, LPDWORD lpBytesRead, LPDWORD lpTotalBytesAvail, LPDWORD lpBytesLeftThisMessage)
HANDLE WINAPI CreateNamedPipeW(LPCWSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
LPVOID lpSecurityDescriptor
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
#define PIPE_ACCESS_INBOUND
#define PIPE_READMODE_BYTE
DWORD WINAPI GetLastError(void)
#define ERROR_BROKEN_PIPE