ReactOS  0.4.15-dev-5130-gc1c1279
CPipedProcess.cpp
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 creates a process and redirects its output to a pipe
5  * COPYRIGHT: Copyright 2015 Thomas Faber (thomas.faber@reactos.org)
6  */
7 
8 #include "precomp.h"
9 
20 CPipedProcess::CPipedProcess(const wstring& CommandLine, CPipe& Pipe)
21  : CProcess(CommandLine, InitStartupInfo(Pipe))
22 {
23  Pipe.CloseWritePipe();
24 }
25 
34 {
36  m_StartupInfo.cb = sizeof(m_StartupInfo);
39  m_StartupInfo.hStdOutput = Pipe.m_hWritePipe;
40  m_StartupInfo.hStdError = Pipe.m_hWritePipe;
41  return &m_StartupInfo;
42 }
LPSTARTUPINFOW InitStartupInfo(CPipe &Pipe)
Definition: CPipe.h:9
STARTUPINFOW m_StartupInfo
Definition: CPipedProcess.h:11
#define ZeroMemory
Definition: winbase.h:1667
HANDLE hStdOutput
Definition: winbase.h:865
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:203
SIZE_T LPSTARTUPINFOW
Definition: cordebug.idl:85
#define STD_INPUT_HANDLE
Definition: winbase.h:264
#define STARTF_USESTDHANDLES
Definition: winbase.h:496
DWORD cb
Definition: winbase.h:849
CPipedProcess(const wstring &CommandLine, CPipe &Pipe)
HANDLE hStdInput
Definition: winbase.h:864
_In_ WDFUSBPIPE Pipe
Definition: wdfusb.h:1741
HANDLE hStdError
Definition: winbase.h:866
DWORD dwFlags
Definition: winbase.h:860