Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreatePipe()

void System.Diagnostics.Process.CreatePipe ( out SafeFileHandle parentHandle,
out SafeFileHandle childHandle,
bool parentInputs )
inlineprivate

Definition at line 2003 of file Process.cs.

2004 {
2005 global::Interop.Kernel32.SECURITY_ATTRIBUTES lpPipeAttributes = default(global::Interop.Kernel32.SECURITY_ATTRIBUTES);
2006 lpPipeAttributes.bInheritHandle = global::Interop.BOOL.TRUE;
2008 try
2009 {
2010 if (parentInputs)
2011 {
2013 }
2014 else
2015 {
2017 }
2018 IntPtr currentProcess = global::Interop.Kernel32.GetCurrentProcess();
2019 if (!global::Interop.Kernel32.DuplicateHandle(currentProcess, (SafeHandle)hReadPipe, currentProcess, out parentHandle, 0, bInheritHandle: false, 2))
2020 {
2021 throw new Win32Exception();
2022 }
2023 }
2024 finally
2025 {
2026 if (hReadPipe != null && !hReadPipe.IsInvalid)
2027 {
2028 hReadPipe.Dispose();
2029 }
2030 }
2031 }
static void CreatePipeWithSecurityAttributes(out SafeFileHandle hReadPipe, out SafeFileHandle hWritePipe, ref global::Interop.Kernel32.SECURITY_ATTRIBUTES lpPipeAttributes, int nSize)
Definition Process.cs:1995

References System.Diagnostics.Process.CreatePipeWithSecurityAttributes(), and System.Runtime.Serialization.Dictionary.

Referenced by System.Diagnostics.Process.StartWithCreateProcess().