ReactOS
0.4.16-dev-297-gc569aee
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
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
32
LPSTARTUPINFOW
33
CPipedProcess::InitStartupInfo
(
CPipe
&
Pipe
)
34
{
35
ZeroMemory
(&
m_StartupInfo
,
sizeof
(
m_StartupInfo
));
36
m_StartupInfo
.
cb
=
sizeof
(
m_StartupInfo
);
37
m_StartupInfo
.
dwFlags
=
STARTF_USESTDHANDLES
;
38
m_StartupInfo
.
hStdInput
=
GetStdHandle
(
STD_INPUT_HANDLE
);
39
m_StartupInfo
.
hStdOutput
=
Pipe
.m_hWritePipe;
40
m_StartupInfo
.
hStdError
=
Pipe
.m_hWritePipe;
41
return
&
m_StartupInfo
;
42
}
GetStdHandle
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition:
console.c:203
CPipe
Definition:
CPipe.h:10
CPipedProcess::CPipedProcess
CPipedProcess(const wstring &CommandLine, CPipe &Pipe)
Definition:
CPipedProcess.cpp:20
CPipedProcess::m_StartupInfo
STARTUPINFOW m_StartupInfo
Definition:
CPipedProcess.h:11
CPipedProcess::InitStartupInfo
LPSTARTUPINFOW InitStartupInfo(CPipe &Pipe)
Definition:
CPipedProcess.cpp:33
CProcess
Definition:
CProcess.h:9
LPSTARTUPINFOW
SIZE_T LPSTARTUPINFOW
Definition:
cordebug.idl:85
_STARTUPINFOW::cb
DWORD cb
Definition:
winbase.h:877
_STARTUPINFOW::hStdError
HANDLE hStdError
Definition:
winbase.h:894
_STARTUPINFOW::dwFlags
DWORD dwFlags
Definition:
winbase.h:888
_STARTUPINFOW::hStdOutput
HANDLE hStdOutput
Definition:
winbase.h:893
_STARTUPINFOW::hStdInput
HANDLE hStdInput
Definition:
winbase.h:892
Pipe
_In_ WDFUSBPIPE Pipe
Definition:
wdfusb.h:1741
precomp.h
ZeroMemory
#define ZeroMemory
Definition:
winbase.h:1737
STD_INPUT_HANDLE
#define STD_INPUT_HANDLE
Definition:
winbase.h:293
STARTF_USESTDHANDLES
#define STARTF_USESTDHANDLES
Definition:
winbase.h:525
modules
rostests
rosautotest
CPipedProcess.cpp
Generated on Tue Nov 26 2024 06:08:43 for ReactOS by
1.9.6