ReactOS 0.4.16-dev-311-g9382aa2
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
20CPipedProcess::CPipedProcess(const wstring& CommandLine, CPipe& Pipe)
21 : CProcess(CommandLine, InitStartupInfo(Pipe))
22{
23 Pipe.CloseWritePipe();
24}
25
34{
39 m_StartupInfo.hStdOutput = Pipe.m_hWritePipe;
40 m_StartupInfo.hStdError = Pipe.m_hWritePipe;
41 return &m_StartupInfo;
42}
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:203
Definition: CPipe.h:10
CPipedProcess(const wstring &CommandLine, CPipe &Pipe)
STARTUPINFOW m_StartupInfo
Definition: CPipedProcess.h:11
LPSTARTUPINFOW InitStartupInfo(CPipe &Pipe)
SIZE_T LPSTARTUPINFOW
Definition: cordebug.idl:85
DWORD cb
Definition: winbase.h:877
HANDLE hStdError
Definition: winbase.h:894
DWORD dwFlags
Definition: winbase.h:888
HANDLE hStdOutput
Definition: winbase.h:893
HANDLE hStdInput
Definition: winbase.h:892
_In_ WDFUSBPIPE Pipe
Definition: wdfusb.h:1741
#define ZeroMemory
Definition: winbase.h:1737
#define STD_INPUT_HANDLE
Definition: winbase.h:293
#define STARTF_USESTDHANDLES
Definition: winbase.h:525